delivered the opinion of the Court.
On 21 June 1974, the appellee, Zane G. Nichols, filed suit against the appellant, Milton R. Felger, in the District Court of Maryland for Anne Arundel County for $345 in unpaid legal fees. On 12 November 1974, trial was held before Judge Raymond G. Thieme. The appellant defended on the ground that the legal services were inadequately performed and, therefore, the fee was unreasonable. The court entered judgment for the appellee in the amount of $345. On 10 December 1974, the appellant appealed to the Circuit Court.
On 19 February 1975, in the Circuit Court for Anne Arundel County, the appellant filed a legal malpractice suit against the appellee, alleging that he had given him “false and untrue” legal advice. On 19 March 1975, the appellant made a motion to consolidate the appeal from the District Court with the malpractice suit in the Circuit Court. The court denied the motion. Thereafter, the appellant dismissed his appeal from the District Court, and that Court’s judgment became final.
On 28 April 1975, the appellee moved for a summary judgment, arguing that the final judgment for the appellee in the legal fee suit made the issue in the legal malpractice suit res judicata. On 12 May 1975, the motion for summary judgment was heard and granted by Judge Karl F. Biener but no order was entered. On 5 June 1975, an appeal was filed, and was dismissed as premature.1 On 5 March 1976, an order was entered granting the motion for summary judgment. This appeal is from that order.
In Maryland, the doctrine of res judie ata, of estoppel by judgment, consists of two branches: direct estoppel by judgment, and collateral estoppel by judgment.2 The *184doctrine of direct estoppel by judgment establishes that in a subsequent action between the same parties upon the same cause of action, claim or demand, or subject matter, a judgment rendered on the merits constitutes an absolute bar, not only as to all matters which were actually raised, litigated and determined in the former proceeding, but also as to all matters which could have been raised and litigated.3 As stated by the Court of Appeals in Lebrun, supra,4 direct estoppel by judgment applies:
“ ‘not only as to every matter which was offered and received to sustain or defeat the claim or demand, but as to any other admissible matter which might have been offered for that purpose.’ ” (Emphasis added.)
The doctrine of collateral estoppel by judgment establishes that where a second action between the same parties is upon a different, “cause of action,” the judgment in the previous action operates as a bar only as to those matters actually litigated and determined in the original action and is not conclusive as to matters which might have been but were not litigated and determined in the previous action.5 Under this doctrine, as under the doctrine of direct estoppel, the matters actually determined in the previous proceeding may have been raised directly or as a matter of defense.6
*185Whether the doctrine of direct or collateral estoppel applies depends upon whether the cause of action in two successive suits between the same parties is the same. Here, we need not determine whether the legal fee suit and the malpractice suit involve the same or different causes of action. The facts here are such that the same result would be reached whether the doctrine of direct or collateral estoppel is applied.
In a suit for counsel fees, the court must consider, among other things, the skill requisite properly to conduct the case, and the fidelity and diligence of the attorney.7 A client, by way of defense, may produce evidence to show that he did not receive competent legal representation. In a legal malpractice suit, the court must consider, among other things, whether the attorney either lacked or failed to exercise the requisite professional diligence, knowledge and skill.8 In such a suit, the client must produce evidence to show that he did not receive competent legal representation. Thus, assuming that both actions involve the same legal service, the matter of the adequacy of the client’s legal representation would be raised in both, either directly or by way of defense, and would be litigated and determined in both. Accordingly, a court’s determination that a lawyer is entitled to a legal fee, made after a client has, as a matter of defense, produced evidence to show inadequate legal representation, would be a bar in a malpractice suit alleging inadequate legal representation, whether the doctrine of direct or collateral estoppel applies.
Here, the record shows that the appellant testified at the District Court trial that four other attorneys had advised him that, contrary to the appellee’s opinion, he had no legal grounds for a limited divorce. He testified that the appellee misrepresented to him that his wife was about to file a *186complaint for divorce against him, and prodded him to file for divorce first. The appellant also testified that thereafter the appellee gave him bad advice when he said he should dismiss his divorce complaint and cross-file on his wife’s complaint. The appellant testified that the appellee was unprepared for an alimony pendente lite hearing. Finally, at the close of the trial, the appellant moved to dismiss the suit “on the grounds that Mr. Nichols did not faithfully and fully discharge the business entrusted to him in the manner a client has the right to expect.. ..”
The record here shows that, as a matter of defense in the legal fee suit, the client did present evidence as to the inadequacy of his attorney’s performance. Under these circumstances, the appellant’s contention that he had no opportunity to “litigate the issue of professional malpractice in the District Court suit,” because he was precluded by Maryland District Rule 314 from filing a counter-claim in excess of that Court’s jurisdictional amount, is without merit.9 Similarly, his contention that the trial court prevented him from litigating that issue by sustaining an objection to a single question is also without merit.10
The adequacy of the attorney’s performance in the client’s divorce proceedings having been litigated and determined, the District Court’s final judgment in the legal fee suit bars that matter from being litigated in the present legal malpractice suit between the same parties. The trial court correctly granted the appellee’s motion for summary judgment. We shall affirm.
Judgment affirmed.
Costs to be paid by appellant.