delivered tlie opinion of the court.
The complaint in this case, now on appeal before .this court, sets up two causes of action. The first is for the recovery of a certain rural property and the second is for the annulment of the title of the defendants on the ground of defects of procedure, it being’ alleged that in an action instituted in Section 2 of the District Court of San Juan hy the Bank of Porto Rico against Solá & Sons, Solá Arguelles & Company and the heirs of Modesto and Celestino Solá the clerk of the said court issued to the marshal thereof a writ for the execution of the judgment rendered in favor of the plaintiff and the said writ was indorsed to the marshal of the District Court of Humacao, who, acting in such delegated capacity, sold the property referred to in the first cause of action at public auction to defendant Francisco Robledo, who shortly thereafter conveyed it hy sale to Manuel Castro, another of the defendants. Castro alleged that he had absolutely no knowledge of the circumstances averred in connection with the acquisition hy Francisco Robledo of title to the property described in the complaint. Robledo alleged that the plaintiff was one of the heirs of Modesto Solá; that she acquired the property in litigation in the partition of the estate of her ancestor under the obligation to pay a debt to the Commercial Bank of Porto Rico, and that upon her failure to pay it the said bank sued for the debt and levied on the property which was sold at public auction to tlie. said defendant. It was alleged also that the sale was ratified by the plaintiff, who entered no appearance in the action in which the sale was made for the purpose of attacking the validity of the levy and the sale of the property. Another defense was that the action was barred by limitation.
The case was tried on its merits and the trial court dismissed the complaint, from which ¡judgment the plaintiff *742took the present appeal, assigning in tlie brief tbe commission of two errors by tbe trial court, as follows:
“1. The trial court committed an error of law in holding that the defects of procedure charged by the plaintiff in the proceeding in which the sale of the property in litigation was made did not render the sale void, but only voidable, and that its invalidity could be invoked only against the parties to the action by a direct attack in the action in which it was made.
“2. The District Court of Humaeao committed an error of law in not requiring Francisco 'Robledo, in the light of the foregoing doctrine, to render an accounting to the plaintiff of the proceeds of the sale and to pay her such an amount as might appear in her favor from the accounting, all in accordance with the testimony of Francisco Robledo, one of the defendants in this ease.”
In connection witb tbe first assignment we will say that tbe material allegations of tbe complaint are not questioned. It is admitted, and it so appears from tbe evidence, that tbe property belonged to tbe plaintiff, to whom it was allotted in tbe partition of tbe estate of ber father, Modesto Sola, in payment of ber legitime and also for tbe payment by ber of certain debts, among them that of tbe Commercial Bank of Porto Rico. Tbis bank sued for its debt and in tbe execution of tbe judgment rendered in its favor by Section 2 of tbe District Court of San Juan tbe writ of execution was issued to tbe marshal of said court and endorsed by bim to tbe ■ marshal of tbe District Court of Humaeao, in which judicial district tbe property was situated, and tbe marshal of Humaeao sold tbe property by public auction to defendant Francisco Robledo.
Tbe legal question so raised is whether tbe fact that tbe writ of execution was endorsed by tbe marshal of San Juan to tbe marshal of Humaeao, in which latter judicial district tbe property to be sold was situated, can affect tbe title of tbe defendants as a consequence qf tbe sale of tbe property to defendant Robledo, rendering tbe said title null and void.
On tbis point tbe trial court said in tbe opinion:
*743“Under tlie common law it was absolutely null and void. At first the states adopted that doctrine, which wa's soon the target of serious objections, and then arose a great difference between the decisions of the different states and even extraordinary differences in some of them. But the modern doctrine,, generally accepted, based on provisions similar to those of our code, that pleadings and non-jurisdictional writs should be liberally construed, has held that an irregularity in the manner of directing a writ of execution does not render the order of execution void, but only voidable; therefore, the objection must be made by a direct attack in the ‘proceeding in which it was issued, it being effective only against the parties and not against a grantee at the judicial sale who wa’s not a party to the proceeding.”
The principles enumerated by the court below to temper the strict rules of the common law have reference to defects or mere irregularities contained in the writ, or observed in its issuance or in the proceedings for its execution. 23 C. J. 756.
These defects are mere clerical errors, as for example when the name of “The People” or the name of the marshal to whom it is addressed is omitted (3 Estee’s 662) or when the defects are contained in the return of the unit by the marshal.
A clear understanding of what is meant by such irregularities is to be found in the case of Blood v. Light, 38 Cal. 654, where it was said:
“It is the policy of the law to uphold judicial sales when collaterally attacked, by securing purchasers, as far as possible, without prejudice to others, against risk. Such a course is to the intere'st of both creditors and debtors, who would be alike prejudiced by a rule which would tend to the insecurity of titles obtained in that way. It is no obstacle to this policy to require the purchaser to take the risk of the officer’s authority to sell, for that can be readily determined by an inspection of the judgment in an execution under which he i's acting, but to require him to ascertain and determine whether the officer has left a copy of the writ with the oeeqpant of the land; or, if there was no occupant, that he has posted a copy upon the premises, and filed another copy, with' a description of the *744land, with the County Recorder, in cases where the land stands on the records of the county in the name of the defendant in the execution; or, when it stand's upon the records in the name of some other person, that he has left with such person, or his agent, a copy of the writ and a notice, that the land (describing it), and any interest which the defendant has therein, has- been seized under the writ, and that he has filed a copy of the writ and notice with the Recorder of the county, and left another copy with the occuxaant of the land; or, if there was no occupant, that he has posted a copy in a conspicuous place on the land; that the judgment debtor has no personal property; that the land is being sold in appropriate parcels, or that it is being sold according to the directions of the judgment debtor, and that it has been advertised according to law, would amount almost to an inhibition upon judicial sales, and tend greatly to the sacrifice of the land, to the prejudice of all parties concerned. Guided by these considerations, the Legislature has nowhere provided that the validity of a purchaser's title shall depend upon the manner in which the officer has performed his duty; but, on the contrary, .without any limitation or qualification to that effect, has provided that 'upon a sale of real property, the purchaser shall be substituted to, and acquire all the right, title, interest and claim of the judgment debtor thereto.' (Sec. 299.) Whether the officer has performed his duty, lie's between him and the parties to the writ, and the purchaser cannot be prejudiced by his remissness or neglect. ’ ’
Section 245 of the Code of Civil Procedure, which, is taken substantially from section 687 of the California Code, reads as follows:
“Sec. 245. — Where the execution is against the property of the judgment debtor, it may be issued to the marshal of any district in the Island. Where it requires the delivery of real or personal property, it must 'be issued to the marshal of the district where the property, of some part thereof, is situated. Execution may be issued at the same time to different districts.”
The language of this section is clear. The appellee is mistaken in saying that there is no provision in the Code of Civil Procedure for determining to what marshal the writ of execution must be issued for the satisfaction of the judgment. This section establishes the rule that the writ *745of execution may be 'issued to tbe marshal of any district in tbe Island, but that rule is limited where real or personal property is to be delivered, in which case the writ must be issued to the marshal of the district in which the property is situated.
In the case under consideration the writ of execution was directed to the marshal of the District Court of San Juan, by which the judgment was rendered; but inasmuch as the property t.o be sold was situated in the district of Humacao and the said marshal’s authority to sell property extends only to or is coextensive with the territorial limits of his district, he thought that he would be complying with the statute by endorsing the writ to the Humacao marshal. However, the endorsement of the writ of execution conferred no authority upon the'marshal of the District Court of Hu-macao. The San Juan marshal had no authority to make the endorsement and his action can not be considered as a mere irregularity or error voidable only by direct attack in the same suit and between the same parties. In point' of fact there ivas no writ of execution directed' to the Hu-macao marshal and the sale of the property, although it was situated within his district, was void and not merely voidable, without legal effect or force, in accordance with the provisions of section 245 cited and the jurisprudence that we have examined as strictly applicable to the present case.
“A's a general rule a sheriff or constable has no authority whatever to execute an execution which is directed to some other sheriff or constable, and as a logical sequence, if he does act under it the sale is void and he a trespasser.
“Within the purview of the law the officer in conducting a sale under execution exercises the functions of an agent, and every one dealing with him, under the general policy of the law in this regard, is presumed to know in what capacity he is acting. It is upon thiá theory that courts have pronounced sales void when made by an officer not vested with authority.” Kleber’s Void Judicial and Execution Sales, 277.
*746“But if the writ is void, or the clerk had no right to issue it, or the officer to whom the writ is directed or delivered has no authority to levy, as where the writ does not direct or command him to levy, the purcha'ser acquires no title. It has been held that a purchaser acquires no title to property sold under a writ which is defective on its face because not in compliance with statutory requirements.” 23 C. J. 757.
The trial court and the appellee cite the cases of Trías et al. v. Rossy, 27 P. R. R. 36; Benet v. Hernández, 22 P. P. R. 326, and Maldonado v. Preston, 22 P. R. R. 614, the first as having a certain similarity to the present case and the others to! distinguish them from the instant case and maintain that they are not applicable. But it is to be observed that the case of Trias v. Bossy decided nothing with regard to the endorsement of a writ of execution by one marshal to another, and that the other cases, though not identical, are governed by the general principle applicable to- jurisdictional defects rendering the acts of the marshal null and void. This is especially the reason why a person who considers himself injured may assert his rights by means of a collateral attack, as is the case here.
“As a general rule a judgment or other judicial proceeding is void collaterally only when, at the time the proceedings were had, there was a want of jurisdiction over the 'subject-matter of the action, or of the person of the defendant, and such inherent infirmity is apparent from an inspection of the record, or the tribunal 'wherein the proceedings were had was not legally organized. If one or more of such radical defects incumber the record, the judgment, order or decree, and all rights and titles resting thereon are complete nullitie's, no matter if the purchaser or holder thereof is one for value and without notice or not. Nor is it a matter of the slightest consequence that the proceedings occurred in a court of the highest dignity in the commonwealth, for they are as destitute of legal efficacy as if they had taken place in the most inferior court known to the law, the proceedings are ooram non judice and void.” Kleber’s, supra, page 379.
The direct attack between the same parties and in tbe *747same action lies in the case of a mere error or irregularity in tlie proceedings of tlie class enumerated, for example, in the case of Blood v. Light, supra. These are the errors that may be corrected by direct attack between the same parties and in the same suit, and if such action is not taken a purchaser in good faith can not be prejudiced in a separate auction. That is the doctrine on which tlie trial court based its judgment; but such not being the case here, where the defects are of lack of jurisdiction or the execution proceedings are void, the sale made thereunder was absolutely void and the purchaser acquired no title to the property.
“The general principle to be deduced from all the authorities is, that the title of a purchaser, not himself in fault, cannot be impaired at law nor in equity, by showing any mere error or irregularity in the proceedings. Errors and irregularities must be corrected by a direct proceeding. If not so corrected, they cannot be made available by way of a collateral attack on the purchaser’s title. Freeman on Executions, sec. 339. But where the court did not acquire jurisdiction of the parties, because no legal service of summons was made upon them, the sheriff’s deed was held to be absolutely void: Hewitt v. Weather by, 57 Mo. 276.” 15 Am. Dec. 92.
We also infer from the foregoing doctrine that an innocent purchaser need not concern himself or inquire about mere errors of procedure, but it is his duty to investigate the capacity or authority with or under which the marshal is acting and ascertain his jurisdictional authority to make the sale, and for that purpose the purchaser need do no more than inspect the judgment and the writ of execution. Blood v. Light, supra.
“As a general rule the writ confers no authority upon any other officer except the one to whom it is directed.
“So strictly is this rule enforced requiring the writ to be executed by the officer to whom it is directed, that a sale made under it by one other than the proper officer to whom it was directed, but by one.to whom it might have been addressed, is without any validity.” Kleber’s, supra, page 276.
*748On tlie other hand, defendant Eobledo, apart from maintaining the validity of the endorsement of the writ of execution, alleges also as defenses the ratification of the judicial sale by the defendant and that the action is barred by limitation under section 1268 of the Civil Code. These two questions were discussed in the opinion of the trial court and rejected. The court did not find sufficient the testimony of the defendant and his witnesses and did not give them full credit as regards the statements attributed to the plaintiff as a ratification of the judicial sale; and from the evidence we find nothing contrary to that conclusion.
The plea of prescription is without merit. The essential basis on which it is sought to have the judicial sale adjudged null and void renders the provisions of section 1268, supra, inapplicable, for if the writ of execution is void, there are no elements to make apparent the existence of a contract and the efficacy of the Contract -of sale was subordinate to the validity or invalidity of the writ of execution; and on this point we apply the doctrine laid down by this Supreme Court in the case of Oliver et al. v. Oliver, 23 P. R. R. 168, where it was held:
“The four years’ limitation fixed for actions for nullity applies only to contracts containing the requisites mentioned in section 1228 of the Civil Code.’’
There remains to be disposed of the question of the $20,000 for mesne profits claimed by the plaintiff from the defendants; but the evidence examined in this particular is not sufficient to support an accurate and judicious estimate of the profits received, and, besides, even if we could estimate them, this is not a case in which recovery of property carries with it the recovery of profits. The defendants were innocent purchasers, and if in this action a collateral attack has invalidated their purchase and disturbed their transactions, the contingency of an erroneous transaction should not bring to them more fatal consequences, and the *749law protects tliem in their good faith as far as the profits are concerned, for which reason they are not bonnd to restore them, in accordance with the provisions of section 453 of the Civil Code.
For the foregoing reasons the judgment of the trial court must he
Reversed.
Chief Justice Del Toro and Justices Wolf, Aldrey and Hutchison concurred.