delivered the opinion of the Court.
This appeal was taken from an order rendered hy Mr. Justice Borinquen Marrero Rios, Acting Judge in vacation, on August 14, 1947. Another petition for habeas corpus, substantially based on the same allegations, was denied seven years ago by the then Chief Justice Emilio del Toro Cuevas after a hearing. The order of Mr. Justice Marrero is predicated, primarily, on that the former order denying the petition for habeas corpus operates as an estoppel to a second petition the matter being res judicata. To this effect he relied on ■§ 8 of the Act of March 12,1903 Providing for Writs of Habeas Corpus, which provides in its pertinent part:
“All orders rendered .... and not appealed from, shall be final and conclusive and no further application in the same case can be made except in the cases specially provided for by law.” (Comp, of 1911, p. 1020).
But appellant invokes § 48 of the Organic Act, which insofar as pertinent, provides:
“That the Supreme and District Courts of Porto Rico and the respective judges thereof may grant writs of habeas corpus in all cases in which the same are grantable by the judges of the District Courts of the United States.”.
And appellant contends that since the doctrine of res judi-cata is not applicable in Federal Courts in habeas corpus pro*511ceedings, said Act of 1903, insofar as it provides that the rule of res judicata prevails in habeas corpus proceedings, is in conflict with 48 of the Organic Act and therefore unconstitutional.
We agree with appellant-in that in federal courts the rule of res judicata is not strictly applied in habeas corpus cases. A judge is not precluded from entertaining a petition for habeas corpus and disposing of it on the merits even though the same point had been ruled adversely to the petitioner in a previous proceeding. Ekberg v. United States, Fed. (2d) (O.C.A. 1st) decided on March 25, 1948. Salinger v. Loisel, 265 U. S. 224 (1924), on which appellant mainly rests his contention, sets forth the rule in such clear terms that its language has been followed without any modification in subsequent cases:
“At common law the doctrine of res judicata did not extend to a decision on habeas corpus refusing to discharge the prisoner. The state courts generally have accepted that rule where not modified by statute; the lower federal courts usually have given effect to it; and this Court has conformed to it and thereby sanctioned it, although announcing no express decision on the point. The cases of Carter v. McClaughry, 183 U. S. 365, 378, and Ex parte Spencer, 228 U. S. 652, 658, are notable instances. We regard the rule as well established in this jurisdiction.
“But it does not follow that a refusal to discharge on one application is without bearing or weight when a later application is being considered. In early times when a refusal to discharge was not open to appellate review, courts and judges were accustomed to exercise an independent judgment on each successive application, regardless of the number. But when a right to an appellate review was given the reason for that practice ceased and the practice came to be materially changed, — just as when a right to a comprehensive review in criminal eases was given the scope of inquiry deemed admissible on habeas corpus came to be relatively narrowed.
“The federal statute (§ 761, Rev. Stats.) does not lay down any specific rule on the subject, but directs the court ‘to dispose of the party as law and justice may require.’ A study of the eases will show that this has been construed as meaning that each application *512is to be disposed of in the exercise of a sound judicial discretion guided and controlled by a consideration of whatever has a rational hearing on the propriety of the discharge sought. Among the matters which may be considered, and even given controlling weight, are (a) the existence of another remedy, such as a right in ordinary course to an appellate review in the criminal case, and (b) a prior refusal to discharge on a like application. (Citations) The decision in the Cuddy Case [40 Fed. 62] was on a second application, and was given by Mr. Justice Field. While holding the doctrine of res judicata inapplicable, he said, ‘the officers before whom the second application is made may take into consideration the fact that a previous application has been _ made to another officer and refused; and in some instances that fact may justify a refusal of the second. The action of the. court or justice on the second application will naturally be affected to some degree by the character of the court or officer to whom the first application was made, and the fullness of the consideration given lo it.’
“In practice the rules we here have outlined will accord to the writ of habeas corpus its recognized status as a privileged writ of freedom', and yet make against an abusive use of it. As a further safeguard against abuse the court, if not otherwise informed, may on receiving an application for the writ require the applicant to show whether he has made a prior application and, if so, what action was had on it.
“Here the prior refusal to discharge was by a court of coordinate jurisdiction and was affirmed in a considered opinion by a Circuit Court of Appeals. Had the District Court disposed of the later applications on that ground, its discretion would have been well exercised and we should sustain its action without saying more. But its decision does not appear to have been put on that ground; and, as circumstances are disclosed which make it appropriate that we consider and pass on two of the objections urged against a removal, we turn to them.” (Italics ours.)
There is no doubt, therefore, that the federal courts have jurisdiction to grant writs of habeas corpus even when a former petition has been previously denied, subject, of course, to the limitations stated in the Salinger case, supra. In other words, the doctrine of res judicata does not apply inflexibly in federal courts to habeas corpus proceedings. Mindful of *513this rule applied by federal courts since its creation, Congress provided in § 48 of the Organic Act that the Supreme and District Courts of Puerto Rico and their respective Justices could grant writs of habeas corpus “in all cases in which the same are grantable by the Judges of the District. Courts of the United States.” This provision of the Organic Act clearly expresses the intention of Congress to warrant the issuance of the writ of habeas corpus in Puerto Rico, at least, in the same cases that it is issued by the District Courts-of the United States. This being so, the Act of March 12,. 1903 which provided that the doctrine of res judicata be inflexibly applied to habeas corpus proceedings, tended to deprive the Insular Judges of jurisdiction in cases where the federal courts may grant it and, therefore, it contravened § 48 of the Organic Act. Consequently this provision is unconstitutional.
Following the rule established in the Salinger case, suprar we now turn to determine whether Mr. Chief Justice Del Toro, in denying the first petition for habeas corpus, “disposed of petitioner in accordance with the law and justice.”' In order to do this we must summarize the first petition and the evidence presented before said Judge.
It was alleged by petitioner on that occasion that on August 5, 1936, at about seven or seven thirty A. M., he-killed Manuel Muñiz Martínez; that he was immediately taken to the office of the District Attorney, before whom he confessed the crime committed by him whereupon the District Attorney filed an information for murder in the first degree; that on the same day he was taken to the Judge of the District Court of Ponce who appointed an attorney to defendant and ten minutes later he was arraigned. The defendant pleaded guilty and was sentenced to life imprisonment between ten thirty and eleven o’clock in the morning; that the appointment of counsel was pro-forma because due to the physical and mental state of the defendant and to the *514haste with which he was prosecuted, the appellant did not have an effective defense as required the importance of the ease; furthermore, that his counsel did not move for the continuance of the trial, but on the contrary permitted him to be hastily sentenced to life imprisonment; that said attorney permitted that judgment be rendered immediately in contravention to § 309 of the Code of Civil Procedure;1 that he did not request the prosecuting attorney to reduce the degree of the crime even though there existed attenuating circumstances; that he did not move for a new trial or appeal from the judgment; that appellant has been confined in the Insular Penitentiary since then, serving the sentence and that his imprisonment is illegal because he was deprived of the due process of law for the aforesaid reasons; that his prosecution violated § 2 of the Org'anic Act and the Fifth and Sixth Amendments of the United States Constitution.
This was in brief the first petition for habeas corpus. When Mr. Justice Del Toro received it he set a hearing at which appellant was present represented by Attorneys Santos P. Amadeo and others, and the Warden of the Penitentiary by the Assistant Fiscal of this Court.
Appellant's evidence consisted of the testimony of Manuel Mariotta and of the expert testimony of Dr. Néstor Vicenty. The former testified that on the day the crime was committed he was a reporter of El Imparcial in Ponce; that he visited the place of the occurrence and then went to the office of the Prosecuting Attorney and there he saw the defendant for the first time at nine o’clock in the morning; that the defendant confessed voluntarily; that thereafter he was taken *515before Judge Sepulveda, who presided the trial, and sentenced to life imprisonment; that from the time that the defendant was brought to the Judge until he was sentenced, there elapsed from twenty to thirty minutes; that he saw Attorney Leopoldo Tormes in the courtroom; that said attorney talked with the defendant for five minutes at the entrance of the courtroom in a hall near the Judge’s office. Eeferring to the impression that the defendant caused him at that time he said that the defendant was calm although he was somewhat pale and gave the impression of a person who does not realize exactly what has happened to him; that the defendant testified that he had been thinking it over for five days whether or not to kill Mr. Muñiz; that he slept very badly the night before; that he got up early and went to the home of Mr. Muñiz and waited for him to come out and while the deceased was on his way to his store, defendant shot him dead; that the defendant in referring to the reasons he had for killing* Muñiz, stated that he had quarreled with him because he had called him a thief; that he had tried to get a job in diverse places in Ponce, but was unable to because Mr. Muñiz had discredited him saying he was a thief; that a few days before, his wife had given birth to a baby girl and that he was in a very bad economic situation. Later, upon being examined by Mr. Justice Del Toro as to the meaning of his statement to the effect that the defendant did not seem to realize what was happening, the witness answered:
“Tn cases of murder in the first degree the situation is somewhat delicate for a defendant, one does not realize exactly the crime committed, the responsibility that one has. But he did not seem to realize the true situation, what he had done, the responsibility which might befall on him to give a confession at such a time.”
The expert testimony of Dr. Vicenty was based on the examination that he made of the petitioner during the two afternoons preceding September 10, 1940 on which date the hearing was held in the habeas corpus proceeding. From *516this examination the expert concluded that four years before, —the day on which the defendant killed Muñiz and trial was held, — he was an abnormal person.
We now come to the evidence of the Warden of the Penitentiary.
The first witness was Attorney Rafael V. Pérez Marchand, the prosecuting attorney who accused the petitioner on August 5, 1936. He testified that he based his information on the spontaneous statement made by the defendant to him, after he had warned him of his rights, which statement was corroborated by the witnesses examined on that occasion and whose names appear in the back of the information; that on that day Dionisio Ramos Ortiz was in a state of apparent mental normality; that he bases this conclusion on the manner in which defendant entered his office, the way in which he reported the facts, his attitude for two hours or more during which the witness observed defendant and the way in which he shared in the conversation about the crime; that at that time his physical appearance was the same as at the hearing of the petition of'habeas corpus; that Attorney Tormes was present while the defendant testified; that at all times the defendant insisted that he wanted to be tried immediately; that before leaving the office of the district attorney to go to the courtroom the defendant spoke with Attorney Tormes, who heard and saw what had taken place in the district attorney’s office that when the defendant was taken to court the clerk again read the complaint to him.
The other witness who testified in support of the legality of the sentence that defendant is serving was Attorney Leopoldo Tormes, who represented him at the trial. This Attorney testified that he was appointed by the court to represent the defendant; that on the day of the crime at about nine o’clock in the morning he went to the office of the district attorney in order to see the latter about the record of an ex liarte proceeding which had been set for that day; that *517lie saw the- defendant and heard his statement as well as that of the witnesses for the prosecution; that the witness knew the defendant for some time before the commission of the offense and did not notice anything strange in his conduct before the district attorney; that he was taken subsequently to the courtroom and the witness being present he was appointed by Judge Sepulveda as counsel for the defendant because the latter had stated that he did not have counsel; that although he had heard his testimony and those of the witnesses for the prosecution in the district attorney’s office he conferred with him for about ten minutes in the attorneys ’ room; that he asked the defendant if he had any parents, brothers or sisters so that he should consult them, and that the defendant answered him: “I want to get through with this. I alone am to blame ’ ’; that at that moment Attorney Francisco Parra Capó passed by and also took part in the conversation with the defendant; that at the latter’s behest they returned to the courtroom but not before he warned him that the minimum penalty was life imprisonment and that defendant stated that he was guilty; that if the witness had noticed that the defendant was acting strangely he would have brought it to the attention of the court; that he did not make a defense because he had no ground on which to base it; that he did not move for the continuance of the trial because there were no grounds therefor, inasmuch as the defendant had accepted his guilt and the witnesses for the prosecution made tremendous charges against him; that he did not ask the prosecuting attorney to reduce the degree because he did not deem it advisable, inasmuch as he had heard the defendant testify that he had waylaid his victim since five o’clock in the morning in the house of the deceased, that he had walked three blocks behind him and shot him in his back without giving him a chance to defend himself.
Based on this evidence Mr. Justice Del Toro dismissed the petition for habeas corpus on the following grounds: That the defendant spontaneously, and free from coercion *518or violence testified before the prosecuting attorney and that his own testimony as well as those of the witnesses for the prosecution were the basis of the information; that it was read to him in open court while he was represented by the attorney appointed by the court and there, after hearing the lengthy statement of the prosecuting attorney and after the judge warned him of his rights, he pleaded guilty and repeatedly ratified his plea, whereupon the judgment was pronounced after the defendant waived the statutory term for imposing sentence; that the record discloses no attenuating circumstances or that if the trial had been postponed for one month and the defendant had been represented by the best attorney, he would have obtained an acquittal or a lesser penalty. From this order no appeal was taken.
The petition herein, presented before Mr. Justice Marrero, is the same as the previous one except .that he now alleges that the proceeding followed in the criminal case was in contravention to the provisions of “The Treason Act”, 1695 (William III c. 3) and it contended that this ancient English statute is in force in Puerto Rico.
Since “The Treason Act” is prior to the United States Constitution, it probably inspired the Sixth Amendment which guarantees to every defendant the assistance of counsel and the Constitution in turn inspired § 2 of our Organic Act. But this does not mean that either the Sixth Amendment or § 2 of the Organic Act should be construed as if they contained every detail of the proceeding prescribed by the old statute.
The question to be determined now is whether the mere fact that the defendant was sentenced four hours after he committed the murder, amounts to depriving him of due process of law and of the assistance of counsel guaranteed by §§ 2 and 48 of our Organic Act-. In order to find the correct solution to this problem we shall examine the surrounding circumstances of the instant case. According to *519tlie liabeas corpus petition, ■when the crime was committed the defendant was twenty-three years old; he had approved the eighth grade and was an employee of a commercial firm in the city of Ponce. After killing his victim he went to police headquarters and reported the crime. Thereafter he was taken to the prosecuting attorney, without it being alleged that the police or any other officer exerted any force or coercion on him that might have any bearing on his attitude with respect to the charges which were brought against him. Manuel Mariotta,, his own witness,, testified that in the presence of the district attorney the defendant had voluntarily confessed his crime and described all the details of the ease. The district attorney warned him of all the legal warnings but he was determined to testify and told the prosecuting attorney that he wanted to get through with the case at once as he knew he was guilty and that he was the only one responsible for the crime committed. There he spoke with Attorney Tormes, who also heard the testimony of the witnesses for the prosecution, who corroborated defendant’s confession and established a case of murder in the first degree. The district attorney read the statement to him and the defendant ratified it. He was then taken to Judge Sepulveda, who appointed Attorney Tormes as his counsel. The latter, notwithstanding the fact that he was familiar with the case because of what he had heard about it in the prosecuting attorney’s office, and because he had spoken to the defendant, went with defendant'to the attorneys’ room and there spoke to him once more and suggested to him to consult his family. The defendant insisted that he was the only one responsible for the crime and that he wanted to get rid of the case. While the defendant was talking to his attorney, Attorney Francisco Parra Capó participated in the conversation. His attorney advised him that the only penalty for murder in the first degree was life imprisonment, but notwithstanding this *520lie insisted in pleading guilty in order to get rid of the case and waived the term to pronounce judgment.
If the confession had been obtained under duress, deceit or ignorance, it could he alleged that he did not have the due process of law; that the judgment was rendered without jurisdiction, and consequently, we would be bound to decide that Mr. Justice Del Toro “did not dispose of petitioner’s case as law and justice may require. ’ ’ But the rights that petitioner now complains were impaired, may be waived and when the waiver is made intelligently, it is valid. Adams v. U. S. ex rel McCann, 317 U. S. 269 (1942) and Patton v. United States, 281 U. S. 276 (1930). We are not aware of any statute providing that from the commission of an offense to the admission of guilt a certain period of time must elapse and that such term cannot be intelligently waived. The term to pronounce judgment fixed by § 309 of the Code of Criminal Procedure is waiveable and as a matter of fact it is frequently waived by the defendants in the courts of Puerto Rico.
It seems clear that Mr. Justice Del Toro disposed of the first case of habeas corpus ‘ ‘ as law and justice may require. ’ ’
The next question to be decided is whether Mr. Justice Marrero erred in dismissing the second petition. The words of Judge Learned Hand in United States v. Thompson, 144 P. (2d) 604 are in point here:
“While it is quite true that an order dismissing one writ of habeas corpus does not formally estop the relator from suing out another on the same grounds, that does not mean .that he may again and again call upon the court to repeat its rulings. Even this great writ can be abused, and when the question has once been decided upon full consideration, there must be an end, else the court becomes the puppet of any pertinacious convict.”
Aud in Wong Doo v. United States, 265 U. S. 239 (1924) wherein as in the present case a second petition for habeas corpus was flatly dismissed in view of the doctrine of ires judicata, because a former petition had been dismissed, it was said:
*521“In Salinger v. Loisel, just decided, ante, 224, we held that in the federal courts the doctrine of res judicata does not apply to a refusal to discharge a prisoner on habeas corpus; but that in those courts, where the prisoner presents a second petition, the weight to be given to the prior refusal is to be determined according to a sound judicial discretion guided and controlled by a consideration of whatever has a rational bearing on the subject.
“It therefore must be held that in this case the courts below erred in applying the inflexible doctrine of res gnddcata. But it does not follow that the judgment should be reversed; for it plainly appears that the situation was one where, according to a sound judicial discretion, controlling weight must have been given to the prior refusal.
“ ® * » * # * #
“¥e conclude that the judgment was right, although a wrong reason was given for it.”
In tlie instant case Mr. Justice Marrero did not err in dismissing tlie petition for habeas corpus, although he erred in basing his decision on the doctrine of res judicata.. But appeals are taken from the judgment and not from its reasoning. Since the result is correct the order dismissing the petition will be affirmed.
Mr. Justice Marrero did not participate herein.Section 309 of the Code of Criminal Procedure provides:
“After a plea or verdict of guilty, or after a verdict against the defendant on the plea of a former conviction or acquittal, if the judgment be not arrested or a new trial granted, the court must appoint a time for pronouncing judgment, which, in eases of felony, must be at least two days after the verdict, if the court intend to remain in session so long; but if not, then at as remote a time as can reasonably be allowed.”