
173 P.3d 433 (2007)
Chester L. LOVE, Appellant,
v.
STATE of Alaska, Appellee.
No. A-9136.
Court of Appeals of Alaska.
December 28, 2007.
*434 Dan S. Bair, Assistant Public Advocate, Chad W. Holt, Section Supervising Attorney, Anchorage Adult and Juvenile Section, and Joshua P. Fink, Public Advocate, Anchorage, for the Appellant.
Terisia Chleborad, Assistant Attorney General, Office of Special Prosecutions and Appeals, Anchorage, and Talis J. Colberg, Attorney General, Juneau, for the Appellee.
Before: Coats, Chief Judge, and MANNHEIMER and STEWART, Judges.

OPINION
COATS, Chief Judge.
On February 2, 2002, while he was on parole release from a prior felony, Chester L. Love was arrested for possession of heroin (fourth-degree controlled substance misconduct). Because Love's possession of the heroin was also a violation of his parole, he was taken into custody both for the new crime and for the parole violation.
Based on Love's possession of the heroin, the Alaska Parole Board revoked his parole, and Love served approximately another two years in prison. The new criminal charge (possession of heroin) was still pending trial.
In March 2004, Love completed serving his time on the parole revocation and was released on bail for the heroin possession charge. But while he was on bail release, Love was charged with an assault and returned to custody.
In December 2004, while Love was still in custody (awaiting trial on both the heroin possession charge and the assault charge), Love reached a plea agreement with the State. Under this plea bargain, Love agreed to plead guilty to the heroin possession charge, and it was further agreed that Love would serve a 2-year term of imprisonment on this charge. The agreement provided that Love would "receive credit for all time served under this case."
At Love's sentencing hearing, his defense attorney asked Superior Court Judge Pro Tem Sigurd E. Murphy to include language in the judgment that indicated Love was to receive credit for time served. The attorney told the court that he was requesting the addition of this language to the judgment because he and his client believed that Love had "already done his time."
One week later, Love moved to withdraw his plea. In support of this motion, Love told the superior court that he had not received the benefit of his bargain  because the Department of Corrections had told Love that he was not going to receive credit against his heroin possession sentence for the two years that he had earlier spent in custody on his parole revocation.
Superior Court Judge Larry D. Card conducted an evidentiary hearing on Love's motion to withdraw his plea. Love's attorney testified at this hearing. According to the attorney, Love agreed to the 2-year sentence on the heroin possession charge only because Love believed that he would be credited for the two years that he had already spent in prison on the parole revocation. Love assumed that, because he had been taken into custody on both the parole violation and the new heroin possession charge, the two years that he served in prison between February 2002 and March 2004 would be credited against both the parole revocation and the new heroin possession charge (in the event that Love was convicted of that charge).
*435 The attorney acknowledged that he had questioned Love's interpretation of his legal situation. In particular, the attorney testified that he had spoken to Love about former AS 12.55.025(e), a statute that has been repealed,[1] but previously provided that "if [a] defendant has been convicted of two or more crimes, sentences of imprisonment shall run consecutively." The attorney testified that he told Love "that the sentences may be consecutive," but that Love was convinced "and, as it turns out, right that . . . they could [be] concurrent." According to the attorney, Love was convinced (based on his prior experience in these matters) that the Department of Corrections would give him double credit for these two years  and, thus, the 2-year sentence for heroin possession would essentially be served as soon as it was pronounced.
The defense attorney and Love decided to ask the superior court to put language in the judgment that Love was entitled to credit for all time served under this case  and then they would leave the actual calculation of Love's sentence to the Department of Corrections. The defense attorney stated that Love "was convinced, and again rightfully so, that he was going to get credit for time served and [that he] had done all his time and would be out shortly. That's the only reason he took the deal."
Love himself also testified at the hearing. According to Love, he told his attorney that he would be willing to accept a plea bargain only if he received credit against his sentence for all the time that he had previously served in prison after he was arrested in February 2002. That is, Love would accept a plea agreement only if it would make him eligible for immediate release.
Love conceded that his attorney had shown him AS 12.55.025(e). But they also discussed other statutes that they thought supported Love's position. Love stated that, based on his experience, the Department of Corrections would allow the sentence on the heroin possession charge to run concurrently with the remainder of his prior felony sentence that he was forced to serve because of the parole revocation. In other words, Love was convinced that he would receive a two-year credit against both sentences for the time he spent in prison between February 2002 and March 2004.
Having heard this testimony, Judge Card denied Love's motion to withdraw his plea. Judge Card found that Love had indeed thought he would be given double credit for the time he served in prison following his parole revocation. However, Judge Card further found that Love's belief was mistaken, and that neither Love's defense attorney nor the prosecuting attorney had told Love anything to foster or confirm this belief. Judge Card further found that the parties had negotiated in good faith, that they fully intended to enter a legal agreement, and that Love should not have been surprised when the Department of Corrections refused to give him double credit for the two years. Love now appeals the superior court's decision.
Why we conclude that Love is entitled to withdraw his plea
Under Alaska law, it is clear that Love could not receive double credit for the two years he spent in prison following his parole revocation. These two years had already been credited against the remainder of Love's sentence on his prior felony  the sentence he was forced to serve after his parole from that prior felony was revoked. After receiving that credit, Love could not receive another two-year credit against his new sentence for heroin possession.
We explained the law on this point twelve years ago in Smith v. State, 892 P.2d 202 (Alaska App.1995):
Smith's present appeal concerns the calculation of [his] sentence. At the time he was sentenced, Smith had spent 266 days in jail. [The sentencing judge] declared that Smith should receive credit against his sentence for these 266 days. The State objected, pointing out that Smith had not been arrested for his present offenses, but rather for violating his parole from [a] prior felony. The State argued that, since *436 Smith was going to be credited with these 266 days in his prior felony, he should not receive another 266-day credit in his present case. [The sentencing judge] disagreed, ruling that Smith should receive the 266-day credit in both cases.
This ruling was incorrect. By law, Smith's sentence in the present case had to run consecutively to his sentence from his previous felony. AS 12.55.025(e); Jennings v. State, 713 P.2d 1222 (Alaska App. 1986). This being so, Smith's 266 days in jail could be applied against only one of these sentences. Endell v. Johnson, 738 P.2d 769 (Alaska App.1987).
Smith, 892 P.2d at 203.
It is uncontested that Love's mistaken belief that he would receive double credit for the two years he served in jail between February 2002 and March 2004 was a critical factor in Love's decision to accept the plea bargain offered by the State. Love accepted the proposed 2-year sentence for heroin possession because he believed that, with the double credit, he would be released from jail immediately after the sentence was imposed. And as soon as Love discovered that the Department of Corrections disagreed with his interpretation of the law, he promptly moved to withdraw his plea.
The defense attorney warned Love that his interpretation of sentencing law might be wrong. The record reflects that Love's attorney talked to him about former AS 12.55.025(e), the statute that required Love to serve the heroin possession sentence consecutively to the remainder of his sentence from his previous felony.
But it seems to us that the crucial fact here is that Love's attorney did not flatly tell Love that his understanding of the law was wrong. Rather, the defense attorney left open the possibility that Love's understanding of the law might be correct. Moreover, the attorney encouraged Love to think that it might make a difference if the judgment included wording that Love "shall receive credit for all time served under this case." Indeed, the defense attorney stated at the sentencing hearing, "[W]e think that [Love has] already done his time."
Judge Card appears to have believed the testimony given by Love and his attorney on these matters. Nevertheless, Judge Card denied Love's motion to withdraw his plea on the theory that it was sufficient for the defense attorney to inform Love of the risk that the Department of Corrections might disagree with Love's interpretation of the law  the risk that the Department would not give Love the double credit he expected.
We disagree. We issued our decision in Smith long before the plea negotiations in this case. Thus, when Love and his attorney were discussing the proposed plea agreement, Alaska law was already absolutely clear that Love could not receive double credit for the two years of imprisonment. These two years had already been credited against the remainder of Love's sentence from his prior felony  the remainder that Love was forced to serve after his parole was revoked. Alaska law flatly stated that these same two years could not additionally count against the new sentence that Love was about to receive on the heroin possession charge.
Love was entitled to competent legal advice when he assessed the proposed plea agreement and decided whether to accept it. The record demonstrates that he did not receive competent advice. The defense attorney did not tell Love that his understanding of Alaska sentencing law was wrong, and that Love would have to serve another two years in prison if he accepted the proposed plea agreement. Instead, the attorney told Love that his understanding of the law might be correct, and that Love would be in a better position if they asked the sentencing judge to insert language about "credit for time served" in the judgment.
The record shows that the defense attorney had questions on this point. But if the attorney performed legal research to resolve his questions, he failed to find our decision in Smith. (We note that the Smith decision is listed in the annotations to AS 12.55.025 in the 2004 edition of the Alaska Statutes, Titles 10 to 12, page 622.)[2] Nor is there any *437 indication that the defense attorney contacted the Department of Corrections to obtain their view on how Love's sentence would be calculated.
Because Love did not receive competent legal advice on this issue, and because this issue was crucial to Love's decision to accept the plea bargain, we conclude that Love is entitled to withdraw his plea. Alaska Criminal Rule 11(h)(3) declares that, even after sentencing, defendants are entitled to withdraw their plea if they "prove that withdrawal is necessary to correct a manifest injustice"  a term that is defined to include ineffective assistance of counsel.[3]
The decision of the superior court is REVERSED. Love must be allowed to withdraw his plea.
STEWART, Judge, dissenting:
Because I conclude that Love has not shown manifest injustice, I would affirm the superior court.
Love was acting as co-counsel on his case when he entered into a plea agreement with the State. Under the Alaska Rule of Professional Conduct 1.2(a), it was Love's choice whether to accept a compromise in his case and what plea to enter. See also Standard 4-5.2 of the American Bar Association's Standards for Criminal Justice, "The Defense Function".
All essential terms of the plea agreement were in writing and filed with the court. The agreement called for Love to plead no contest to one count of fourth-degree misconduct involving a controlled substance.[1] The State agreed that statutory mitigating factor AS 12.55.155(d)(14) (now (d)(13) under the present code; Love's offense involved a small quantity of controlled substances) applied and agreed that Love would receive a mitigated presumptive 2-year term. (Love had prior felonies and faced a presumptive 3-year term to serve under the pre-March 2005 sentencing law.) The State agreed that the other pending count Love faced in this case  resisting arrest[2]  would be dismissed along with another misdemeanor case, State v. Love, 3AN-04-11604. Love agreed to waive the presentence report and be sentenced at his change of plea. The Notice of Agreement filed with the court included a provision that read: "The defendant shall receive credit for all time served under this case."
At the change of plea before Superior Court Judge pro tem Sigurd E. Murphy, Love's attorney asked the court to include a provision in the judgment that Love get credit for time served because Love thought he had already "done his time." Judge Murphy understood this to mean that the Department of Corrections (DOC) would calculate the time that Love had accrued rather than a situation where Love had completed serving his time because he understood that he should endorse "DOC to give credit for time served rather than saying it's a time served [case.]" Neither Love nor his attorney said anything to Judge Murphy about his understanding and neither claimed the notice of plea agreement was incomplete. Although Love's attorney told Judge Murphy that they thought Love had served all his time, they did not tell Judge Murphy that the plea agreement guaranteed that Love would not serve any additional time. Judge Murphy accepted the plea, and Love received the agreed mitigated presumptive term. Judge Murphy included a provision in the temporary order for "DOC to give credit for time served" for the 2 years imposed.
Shortly after sentencing, Love's attorney moved to withdraw, informing the court that Love would attempt to withdraw his plea and that a potential reason under Criminal Rule 11(h) was that Love might assert ineffective assistance of counsel. The attorney informed the court that Love thought that the Department of Corrections erred when it charged time he had previously served to his parole revocation case. When the Department *438 of Corrections calculated Love's time served on this case, it did not grant Love double credit for the time he served on the parole violation and for the time he was subject to bail conditions in this case. Superior Court Judge Larry D. Card allowed Love's assistant public defender to withdraw and appointed the Office of Public Advocacy.
Love, as co-counsel, personally filed a motion to withdraw his plea. Love contended that plea withdrawal was necessary to correct manifest injustice under Criminal Rule 11(h)(4)(D)(i) because he did not receive the sentence concessions contemplated by the agreement, and the State had failed to seek the concessions promised in the agreement. Love did not contend there was manifest injustice under Criminal Rule 11(h)(4)(A) because he received ineffective assistance of counsel. Later, the assistant public advocate assigned to Love's case, and Love as co-counsel, both replied to the State's opposition consistent with Love's original claim that the State was not fulfilling its bargain. Neither pleading filed by Love or Love's assistant public advocate claimed ineffective assistance of counsel.
Judge Card held an evidentiary hearing on Love's motion. There were no opening statements by the parties before Judge Card heard testimony from Love, Love's trial attorney, and the assistant district attorney involved in the plea negotiations. After hearing the evidence presented, Judge Card heard argument on the motion from the State, Love's attorney, and Love himself. Neither Love nor his attorney argued that he had received ineffective assistance of counsel.
Under Alaska Criminal Rule 11(h)(3), a defendant moving to withdraw a plea after sentencing must prove that withdrawal of the plea is necessary to correct manifest injustice.
Judge Card found that Love's co-counsel discussed with Love the relevant statutes and whether concurrent time was possible in Love's situation. However, Judge Card found that Love relied on his own beliefs and concluded that he would obtain double credit even though he had been informed of the contrary from his co-counsel.
The answer to the underlying legal issue is clear. Former AS 12.55.025(e) provided in pertinent part that "if the defendant has been convicted of two or more crimes, sentences of imprisonment shall run consecutively." We have consistently interpreted that provision to require sentences to be imposed consecutively in circumstances that exist in Love's case where a defendant is on parole and commits another offense. In Jennings v. State,[3] this court held that under former AS 12.55.025(e), trial judges were required to impose a consecutive sentence when a defendant is convicted for a crime which the defendant committed after the defendant had been imprisoned on a former offense.[4] We followed that interpretation in cases that followed.[5]
Judge Card reviewed the potential claims of manifest injustice specified in Criminal Rule 11(h)(4)(A)-(D). Judge Card noted that Love's original trial attorney had identified ineffective assistance as a potential claim (in the motion to withdraw), and although the issue had not been litigated at the hearing, Judge Card found that Love's attorney had been effective and rejected (4)(A) as a potential basis for manifest injustice. Judge Card found that Love's attorney had discussed the impact of former AS 12.55.025(e) with Love. However, Love chose to follow his own analysis of the situation. As Judge Card found, "Mr. Love has his own thought process[.]" Essentially, Judge Card found that Love relied on his own legal analysis, not that of his co-counsel.
Judge Card also concluded that Love had not shown manifest injustice under (4)(B) (the plea was entered by one not acting on the defendant's behalf) or (4)(C) (the plea was entered involuntarily).
Finally, Judge Card found that Love received the charge and sentence concessions *439 contemplated by the plea agreement and rejected Love's claim that there was manifest injustice under Rule 11(h)(4)(D).
There was no evidence presented at the hearing that the prosecuting attorney promised Love the result he hoped for. Love entered into the plea agreement relying on his own analysis of the law and his personal expectations of the result. Furthermore, Love has not shown that the judge who handled his change of plea and his sentencing, Superior Court Judge pro tem Sigurd E. Murphy, was informed of Love's personal interpretation of the law, nor has Love shown that Judge Murphy did anything to credit Love's unilateral interpretation of the law. Judge Card found that Love's co-counsel told Love about the policy for crediting time served, explained the statutes, and discussed the law with Love.
Judge Card found that the parties were not attempting to enter an illegal plea agreement. He found that Love did not develop a misunderstanding of the plea agreement from his co-counsel, from the Department of Corrections, from the prosecution, or from the judge at his change of plea and sentencing.
Although the parties did not litigate the issue in the superior court, Judge Card addressed the point when he rejected all the listed grounds in Criminal Rule 11(h)(4). After Judge Card ruled on the motion, Love's assistant public advocate moved to withdraw and reassign the case to the Public Defender Agency, pointing out that Love had not claimed that his original trial attorney was ineffective.
Even though the issue was not litigated in the superior court, the majority finds as a matter of plain error that Love's co-counsel was incompetent, apparently because "Love's attorney did not flatly tell Love that [Love's] understanding of the law was wrong." And the court implicitly concludes that the incompetence contributed to Love's actions.
But Judge Card found that Love's attorney explained the statutes and talked over the law with Love. He found that Love's attorney acted as any reasonable attorney would have in advising Love of his rights, obligations, and potential liability. But as Judge Card found, "Love thought he had an answer." Love thought, based on anecdotal information in other prisoner's cases and based on his own analysis, that he would obtain concurrent time. Judge Card also found that Love did not obtain this view based on his lawyer's advice, on anything the prosecutor did, or on anything Judge Murphy did at the change of plea.
In my view, Judge Card's findings show that Love decided to go forward with the plea agreement contained in the written notice to the court no matter what his attorney may have advised because he was convinced that his own analysis was correct. I also do not conclude that the record establishes as a matter of law that Love's trial attorney was incompetent, especially when the issue was not litigated and the State was not on notice that the trial attorney's competence was an issue.
NOTES
[1]  See SLA 2004, ch. 125, § 7.
[2]  Following the repeal of AS 12.55.025(e) and the enactment of a new statute governing consecutive sentencing, AS 12.55.127, the Smith decision is now listed in the annotations to AS 12.55.127. See the 2006 edition of the Alaska Statutes, Titles 10 to 12, page 704.
[3]  Alaska R.Crim. P. 11(h)(4)(A).
[1]  AS 11.71.040(a)(3)(a) (possession of heroin).
[2]  AS 11.56.700(a)(1).
[3]  713 P.2d 1222 (Alaska App.1986).
[4]  Id. at 1223.
[5]  See Griffin v. State, 9 P.3d 301, 308 (Alaska App.2000), Smith v. State, 892 P.2d 202, 203 (Alaska App.1995), Sanders v. State, 718 P.2d 167, 168 (Alaska App.1986).
