
155 Cal.App.3d 132 (1984)
202 Cal. Rptr. 37
THE PEOPLE, Plaintiff and Respondent,
v.
JOSEPH JEFFERSON LISTER, Defendant and Appellant.
Docket No. 17165.
Court of Appeals of California, Fourth District, Division Three.
May 1, 1984.
*133 COUNSEL
Michael S. Meza for Defendant and Appellant.
John K. Van de Kamp, Attorney General, A. Wells Petersen and Pat Zaharopoulos, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WALLIN, J.
This is defendant Joseph Lister's third appeal in this case. The only issue presented is whether, on the second remand for resentencing, *134 the court properly imposed a sentence consecutive to a federal term which was imposed after the first time Lister was sentenced.
Lister was convicted on state charges and sentenced in April 1979. The trial judge attempted to make this initial sentence consecutive to the term for Lister's case then pending in federal court. In May 1979, Lister was convicted in federal case and sentenced to a term to be served concurrently with his state term. Lister appealed his state court conviction and the case was remanded twice for resentencing. On the second remand, January 24, 1983, the sentencing court correctly calculated the term, but ordered the term to run consecutively to the federal term pronounced in May 1979. We modify that portion of the sentencing order to indicate the term will run concurrently with the federal term.

DISCUSSION
(1a) Penal Code section 669 authorizes a state court to direct that a term run consecutively to any prior judgment, including a federal judgment. (People v. Veasey (1979) 98 Cal. App.3d 779 [159 Cal. Rptr. 755].)
Defendant contends the date of the judgment in this case is the date he was first sentenced in April 1979. Therefore the May 1979 federal judgment was subsequent to the state judgment. Because Penal Code section 669 authorizes a court to impose sentence consecutive to prior judgments only, the state court had no power to impose a term consecutive to the "subsequent" federal judgment.
We disagree with Lister's analysis. No judgment occurred in this case until Lister was properly sentenced on January 24, 1983. Therefore, the May 1979 federal judgment is "prior" to the state judgment for purposes of Penal Code section 669 and the court had the power to order the term to run consecutively to Lister's federal term.
Nevertheless, we must consider whether, on remand, it was proper for the court to impose a sentence which the original sentencing court could not have imposed. (2a) Although on remand for resentencing a court may impose a greater sentence than was actually imposed, (People v. Serrato (1973) 9 Cal. 3d 753 [109 Cal. Rptr. 65, 512 P.2d 289]) we conclude it may not impose a greater sentence than could potentially have been imposed originally.
In People v. Serrato, supra 9 Cal.3d 753, the Supreme Court held an unauthorized sentence "is subject to being set aside judicially and is no bar to the imposition of a proper judgment thereafter, even though it is more *135 severe than the original unauthorized pronouncement." (Id., at p. 764.) Serrato requires a defendant to risk receiving a greater sentence than was originally imposed in order to exercise his right to appeal an erroneous sentence. This rule is necessary to permit proper, legal sentencing once the error is discovered. There is no good reason to require a defendant to risk a greater sentence than could potentially have been imposed originally.
(1b) A rule permitting a court on remand to impose a term consecutive to a judgment which did not exist when the defendant was originally sentenced, would penalize the defendant for pursuing a successful appeal. It would require him to risk receiving a greater sentence than the original sentencing court had power to impose. (2b) A defendant must not be penalized for exercising his right to appeal. (See People v. Collins (1978) 21 Cal.3d 208, 216-217 [145 Cal. Rptr. 686, 577 P.2d 1026].) Therefore, a court must impose sentence on remand within the parameters limiting the original sentencing court.
Here the original sentencing court attempted to impose a sentence consecutive to Lister's federal term. Obviously, the court was aware of the federal proceedings and identified them with sufficient particularity. (Pen. Code, § 669.) (3) However, it had no power to impose sentence consecutive to a federal sentence which had not yet been pronounced. (Pen. Code, § 669; People v. Carter (1977) 75 Cal. App.3d 865 [142 Cal. Rptr. 517].) (1c) Because the court could not impose a consecutive term in the first instance, we hold it could not impose a consecutive term on remand.
The judgment is affirmed and the sentencing order is modified. The sentence will be served concurrently with the term Lister is now serving in federal prison.
Trotter, P.J., and Sonenshine, J., concurred.
