Plaintiff appeals the order of this court dated August 10,1992, sustaining defendant’s preliminary objections and dismissing plaintiff’s complaint.
The facts of this case can be summarized as follows: Plaintiff, H.A. Perotti Inc., filed a complaint in district court seeking the sum of $5,000 in satisfaction of a loan *598made to the defendant. On October 3, 1991, after a hearing on the merits, the district justice entered judgment for the plaintiff. Defendant filed a timely notice of appeal, praecipe to enter rule to file complaint and rule to file pursuant to Pa.R.C.P.D.J. 1004 which case was duly docketed under no. 91-10680-15. When plaintiff failed to file a complaint within the required 20 days, the prothonotary, upon praecipe of the defendant, entered a judgment of non pros pursuant to Pa.R.C.P.D.J. 1004(b).
One day following the entry of the judgment of non pros the prothonotary received plaintiff’s complaint. In response the defendant filed preliminary objections in a motion to quash the untimely complaint. While this matter was pending before the court, plaintiff filed a second identical complaint under docket no. 92-856-18-1 more than two months after it had filed the complaint in action no. 91-10680-15-1. Defendant filed preliminary objections in the second action on the basis that it was identical to the earlier untimely filed complaint.
In action no. 91-10680-15-1, Honorable Leonard B. Sokolove entered an order on April 30, 1992, sustaining defendant’s preliminary objections for failure to comply with law or rule of court. By order dated August 10, 1992, we also sustained defendant’s preliminary objections in the second identical complaint. Plaintiff appeals the order sustaining defendant’s preliminary objections in the second cause of action.
The issue presented is whether a district court judgment is res judicata where the defendant appeals the judgment to the trial court, plaintiff suffers a non pros for failure to comply with rule of court, and two months later, the plaintiff attempts to reinstitute the same cause of action *599under a different docket number. We found that the district court judgment had res judicata effect, and therefore plaintiff was barred from filing a second complaint.
We are presented with two inconsistent Pennsylvania Superior Court decisions with similar factual scenarios. In A.C. Elfman & Sons Inc. v. Clime, 355 Pa. Super. 394, 513 A.2d 488 (1986), the district justice entered judgment by agreement in favor of the defendants. Plaintiff then appealed the decision to the Court of Common Pleas; however, he failed to file a complaint within the required 20 days. Defendants moved pursuant to Pa.R.C.P.D.J. 1006 to strike the appeal and the trial court granted the motion. More than four months later, plaintiff filed a new complaint in the Court of Common Pleas alleging the same cause of action. The trial court held that the district court judgment was not res judicata; however, the Superior Court reversed and found a final judgment of a district court will have res judicata effect where the doctrine of res judicata is otherwise applicable. Id. at 397, 513 A.2d at 490.
Although factually similar to Elfman, a different panel of the Superior Court in the case of Hatchigian v. Koch, 381 Pa. Super. 377, 553 A.2d 1018 (1989), arrived at a different conclusion. In this case, the defendant appealed the decision of the district court to the trial court. Upon plaintiff’s failure to file a timely complaint, a judgment of non pros was entered. Plaintiff instituted a second action in the trial court alleging the same cause of action. Judge Corso of the Court of Common Pleas of Montgomery County granted the defendant’s motion for summary judgment because he regarded the district court judgment as being res judicata and barred the plaintiff’s *600subsequent action, citing the Elfinan decision as establishing “that although a district court is not a court of record, a filial district court judgment will have res judicata effect where res judicata is otherwise applicable.” Hatchigian at 379, 553 A.2d at 1019.
The Superior Court rejected this argument and found that there were important “procedural differences” between the two cases. In Elfman the court struck the appeal in the trial court for plaintiff’s failure to file a timely complaint while in Hatchigian the complaint was non prossed for failure to timely file.
We are unable to see a substantive difference between the two. In both cases there was a prior district court judgment followed by an appeal to the trial court; and in both cases the appeal or complaint was dismissed for failure to timely file a complaint. The only technical difference we discern is a distinction created in the rules regarding appellate proceedings with respect to judgments of district justices. If the party appealing the decision of the district court was the defendant (emphasis added) in the action before the district justice, Pa.R.C.P.DJ. 1004(b) applies and the plaintiff in the prior action must file a complaint within 20 days after service of the rule or suffer a judgment of non pros. However, if the appellant was the plaintiff (emphasis added) in the prior action before the district justice, Pa.R.C.P.DJ. 1004(a) applies and plaintiff must file a complaint within 20 days after filing his notice of appeal or the appeal will be stricken from the record pursuant to Pa.R.C.P.DJ. 1006. Regardless of the distinction, the result is the same. Failure to file a complaint within the required 20 days results in a non pros of the complaint.
*601To establish the defense of res judicata four elements must be shown: (1) identity of the thing sued upon; (2) identity of the cause of action; (3) identity of the parties to the action; and (4) identity of the quality or capacity of the parties suing or being sued. Elfinan, supra, at 397, 513 A.2d at 489.
As the record indicates, we found the four identities necessary to invoke the doctrine to be present. In the action before the district justice and the action before this court, the plaintiff sued the same party on the same cause of action. Therefore, we believed the judgment of the district court to have res judicata effect and plaintiff to be barred from filing a second complaint.
We further believed a contrary result would sanction a multiplicity of identical law suits in which the plaintiff had been properly non prossed for failure to comply with the rules of court.
Based on the foregoing, defendant’s preliminary objections were sustained and plaintiff’s complaint was dismissed.