
115 Cal.App.2d 834 (1953)
DAVID C. MOORE et al., Respondents,
v.
CALIFORNIA MINERALS PRODUCTS CORP. (a Corporation), Appellant.
Civ. No. 19191. 
California Court of Appeals. Second Dist., Div. Three.  
Feb. 9, 1953.
 Marcus, Rabwin, Nash & Naiditch and F. J. Schuhl for Appellant.
 Donald E. Dunbar for Respondents. *835
 SHINN, P. J.
 Plaintiffs, attorneys at law, brought suit against California Mineral Products Corporation for $8,594.32, balance claimed to be due for legal services rendered and costs expended at the special instance and request of defendant. The suit was on an implied contract, the services were alleged to be of the value of $8,800, $44.32 the amount of money expended, and it was acknowledged that $250 had been paid on account. The first cause of action alleged the employment of plaintiffs, described the services rendered, and alleged the value thereof. The second cause of action was in the form of a common count for services rendered and the third cause of action alleged an account stated. The corporation answered, admitting the employment of plaintiffs through one Colonel Pettric, "one of the promoters, director and President of said defendant" and alleged that "the fee for said plaintiffs as such assistant counsel had been fixed between Colonel Pettric and the plaintiffs at One thousand ($1,000.00) dollars." The answer read, in part: "Defendant acknowledges the agreed fee for employment of plaintiffs to work with said Hiram McTavish, Esquire, for the sum of One thousand ($1,000.00) dollars; agree to pay the costs expended by plaintiffs of forty-four dollars and thirty-two cents ($44.32); total charge One thousand forty-four ($1,044.32) dollars and thirty-two cents." The answer admitted an indebtedness of $594.32 and alleged defendant's willingness to pay the same. It denied "that there is due and unpaid as alleged the sum of Eight thousand Five hundred ninety-four dollars and thirty-two cents ($8,594.32)." It admitted that plaintiffs submitted "attorneys statement of account with defendant," but denied that an account was stated in the amount of $8,594.32.
 When the action came on for trial counsel for plaintiffs made an opening statement of the services performed by plaintiffs. Mr. Mayes, counsel for defendant at the trial, in his statement admitted the services were rendered, but asserted that plaintiffs were employed for a fee of $1,000 and no more, $250 down and the balance upon the release of certain funds held in escrow under order of the Commissioner of Corporations. He stated that the board of directors had not assumed any obligation for attorney's fees in excess of $1,000 and insisted that if anything more was earned it was a debt of the promoter and not the corporation.
 [1] At the conclusion of the opening statements the court made the following statement: "This Court is ready to rule *836 on the case right now. The answer doesn't deny the allegations of the complaint. It raises no issue as a matter of law. The only issue it raises is as to whether or not the sum of $8,594.32 is due. It denies that much is due, but it doesn't deny that $8,593.32 is due, and the judgment will be for the plaintiff in that amount, and costs. Plaintiff is to prepare the findings and judgment." No motion was made for judgment on the pleadings. Nothing was said with respect to the sufficiency of the answer to raise a triable issue of fact. Although the denials of the answer to which the court called attention, standing alone, would have been insufficient, the answer alleged a special contract of employment of plaintiffs for an agreed fee of $1,000. At most, the answer was uncertain and the objection was purely technical. Moreover, it appeared from the opening statement of defense counsel that defendant expected to prove it had incurred no obligation in excess of $1,000, of which $250 had been paid. The answer was directed to the complaint as a whole and to each cause of action. The allegation of the special contract should have been considered with the insufficient denials. The court overlooked the allegation that plaintiffs were employed by a special contract. The ruling came as a surprise to defense counsel, who had no opportunity to point out the sufficiency of the answer to raise an issue as to whether the amount of the fee had been fixed by agreement at $1,000. The parties were prepared to go to trial, and but for the precipitate and unexpected action of the court would have done so.
 Not only was it error to order judgment on the pleadings but the manner in which it was done deprived defendant of due process, namely, a right to be heard. [2] The law favors the trial of causes on the merits. It hears before it condemns, and even though a litigant be present, to deny him the right to speak is no better than to judge him in absentia. When the court summarily disposed of the case, defense counsel was given no opportunity to defend his pleading nor even a chance to request the privilege of amending, if that appeared to be desirable. It is true that he could have asked the court to recall its decision and listen to argument, but this opportunity, as every lawyer knows, is a poor substitute for the right to be heard before the decision is announced.
 It is accepted and unexceptionable practice for judgment to be rendered upon points of law, as when a demurrer is sustained to the complaint or answer without leave to amend, *837 or a motion to exclude evidence is granted. A right to be heard is afforded in such cases, although, of course, the right does not run to every step or ruling of the court during the trial and is subject to all reasonable limitations. Manifestly, such summary proceedings differ in fundamental respects from those here under review.
 In our research we have not discovered another case in which judgment was rendered upon a point of law raised by the court with no warning of counsel and no opportunity given to ward off the blow. [3] Elementary principles of due process support our conclusion that if, during a trial, the court, sua sponte, unearths a point of law which it deems to be decisive of the cause, the party against whom the decision impends has the same right to be heard before the decision is announced that he has to produce evidence upon the issues of fact. Denial of that opportunity deprived defendant of a substantial right to which it was entitled by virtue of the guarantee of due process. (Universal Consol. Oil Co. v. Byram, 25 Cal.2d 353, 361 [153 P.2d 746]; McClatchy v. Superior Court, 119 Cal. 413, 421 [51 P. 696, 39 L.R.A. 691]; 16 C.J.S. 1265; 12 Am.Jur. 327; 5 Cal.Jur. 876.)
 The judgment is reversed with directions to permit defendant to amend its answer if it be so advised.
 Wood (Parker), J., and Vallee, J., concurred.
