Defendant appeals his conviction of felony escape (13 V.S.A. § 1501(a)(2)) on the grounds that (1) when he escaped he was *296not “in custody as a result of a felony” within the meaning of the statute, and (2) the court erred by denying his motion to enforce a deferred-sentencing agreement. We affirm.
On September 15,1994, defendant’s girlfriend called the police and alleged that defendant had assaulted her. An officer arrived and arrested defendant without a warrant and brought him to the St. Johnsbury police barracks for processing. While the officer was drafting his charging affidavit, defendant left the barracks and was apprehended a few hours later as he was hitchhiking along 1-91.
Following the escape, the officer completed his charging affidavit, dated the same day as the arrest and escape, which included the misdemeanors of simple assault (13 V.S.A. § 1023) and reckless endangerment (13 V.S.A. § 1025). The affidavit also included a charge of escape from custody (13 V.S.A. § 1501), which was not identified as either a misdemeanor or a felony.
The State subsequently charged defendant with simple assault, reckless endangerment, first-degree aggravated domestic assault (13 V.S.A. § 1043(a)(2)), and felony escape. The complaining witness, however, later recanted her statement, and the state’s attorney withdrew all charges except for felony escape. Prior to trial, defendant moved to dismiss the felony escape charge on grounds that dismissal of the underlying criminal charges negated the offense of escape and that the information charging felony escape was not supported by the facts underlying his escape as a matter of law. Following denial of the motion, defendant was convicted of the escape charge in a jury trial. The court denied defendant’s motion for reconsideration, and the present appeal followed.
I.
The first issue is whether defendant was in custody as a result of a felony. Defendant concedes that he was in lawful custody when he left the police barracks. He argues, however, that he had been charged only with misdemeanor offenses at the time of his escape. As a result, defendant claims that he was not “in custody as a result of a felony” for purposes of 13 V.S.A. § 1501(a)(2).1
To obtain a conviction under 13 V.S.A. § 1501(a)(2), the State must prove that defendant was in lawful custody and escaped or attempted *297to escape from an officer. The crime is a misdemeanor if the person was in custody as a result of a misdemeanor, and it is a felony if the person was in custody as a result of a felony.
Custody, as used in the escape statute, is not limited to custody obtained after the state’s attorney files formal charges, or the State proves defendant’s actual culpability in the underlying offense. See State v. Turgeon, 165 Vt. 28, 34, 676 A.2d 339, 342-43 (1996) (custody arises when defendant is brought under officer’s control); State v. Blaine, 133 Vt. 345, 350, 341 A.2d 16, 19 (1975). In Blaine, we considered whether an accused could be convicted of escape from lawful custody of a police officer when the escape occurred before the accused was convicted of the underlying felony. 133 Vt. at 350, 341 A.2d at 19. We framed the critical issue as “whether . . . lawful custody existed at the time respondent took his departure from the police station, after. . . the officer attempted] arrest.” Id. at 350, 341 A.2d at 19. We reversed the defendant’s conviction not because he had not been convicted, but because he had not been properly arrested. The trial court, therefore, correctly concluded that “custody as a result of a felony” includes custody as a result of an arrest for a felony. This is true whether or not formal charges had been brought at the time of the escape. See State v. Stores, 816 P.2d 206, 210-11 (Alaska Ct. App. 1991) (“official detention for a felony” included arrest on felony charges).
The question is how to determine whether defendant was in custody for a misdemeanor or a felony after his arrest, but before the State charged him with a felony. Defendant argues, without citation, that the determining factor is the “custodial status” of the accused at the time that he commits the escape. Defendant further argues that “custodial status” is not determined by the facts that precipitated the arrest, but by the most recent criminal procedure performed by the State, e.g., a warrantless arrest, an arrest based on a warrant, or a trial and conviction. Defendant concludes, therefore, that we should determine whether he was in custody for a felony or a misdemeanor based on the charges stated in the police officer’s charging affidavit, rather than by the subsequent charges filed by the state’s attorney. Because defendant escaped before the State charged him with a felony, and the officer’s charging affidavit charges defendant only with misdemeanors, defendant would have us conclude that he was in custody as a result of a misdemeanor.
First, we agree with defendant that whether he was arrested for a misdemeanor or felony cannot be determined by the subsequent *298charges filed by the state’s attorney. V.R.Cr.E 3(a) makes clear that warrantless arrests other than for a crime committed in the presence of an officer may be based only on probable cause that a felony, misdemeanor, or other offense or violation of a specified order has occurred, as set forth in the rule. See State v. Stanislaw, 153 Vt. 517, 527, 573 A.2d 286, 292 (1990). In a prosecution for escape before conviction, the State must show that the defendant was arrested with probable cause to believe that he had committed the crime for which he was arrested. See People v. Maldonado, 658 N.E.2d 1028, 1031 (N.Y. 1995). A finding of probable cause must be based on substantial evidence. V.R.Cr.E 4(b); see also State n Towne, 158 Vt. 607, 615, 615 A.2d 484, 489 (1992) (holding that court must examine totality of circumstances to determine whether substantial evidence supports issuance of search warrant). The final clause of V.R.Cr.E 3(a)(6) states that “[pjrobable cause shall be based on the same evidence required for issuance of a summons or warrant under Rule 4(b).”
Because the evidence required for a summons or warrant can be only evidence that is available at the time the summons or warrant is sought, it follows that a warrantless arrest may be supported only by evidence available at the time the arrest is made. Supporting this construction is the fact that the statute speaks in the past tense: “if the person was in custody as a result of a felony” he or she is guilty of-felony escape. 13 V.S.A. § 1501(a)(2) (emphasis added); cf. Commonwealth v. Janis, 583 A.2d 495, 497 (Fa. Super. Ct. 1990) (noting past tense in similar statute).
A judicial inquiry into probable cause for a warrantless arrest is therefore an examination of what facts were known to the arresting officer, not what may have developed subsequently. That examination necessarily occurs, as in the present case, after the arrest, at a hearing challenging its validity. See State v. Blais, 163 Vt. 642, 643, 665 A.2d 569, 570 (1995). The State may no more justify a warrantless arrest on the basis of a subsequent indictment or information than it might argue in seeking an arrest warrant that probable cause is supported by its intention to indict the suspect for a felony. See Janis, 583 A.2d at 498.2
*299Nevertheless, the State argues that the arresting officer erred in labelling the offenses as misdemeanors in the charging affidavit, and that such an error does not conclusively establish the crimes for which defendant was arrested. We agree. Considering the facts known to the officer at the time the arrest was made, the trial court properly concluded that those facts were sufficient to support an arrest for the commission of a felony. The facts set forth in the officer’s charging affidavit were obtained from a sworn statement of defendant’s girlfriend. The affidavit states in part that defendant placed a loaded pistol to her head and threatened to shoot her. This fact, in conjunction with the other information set forth in the affidavit, provided the officer with sufficient probable cause to support an arrest for aggravated' domestic assault under 13 V.S.A. § 1043(a)(2), a felony.
Moreover, we note that the grading of the escape offense does not turn on whether defendant had notice of whether the underlying crime he is accused of is a felony or a misdemeanor. Cf. State v. Walker, 891 P.2d 942, 946-47 (Ariz. Ct. App. 1995) (notice of charge not necessary under Arizona escape statute). To permit a defendant to complain that he was unaware of the nature of the charges at the time he fled would reward escape from custody at the earliest opportunity and would significantly hamper ordinary law enforcement efforts. Rather, the grading of the crime is a legislative strategy to fit the punishment for escape to the severity of the crime for which, a defendant is arrested, on the theory that the more serious the underlying offense, the greater the danger to the public. Maldonado, 658 N.E.2d at 1030.
Despite the officer’s erroneous labelling of the charges as misdemeanors, the officer had probable cause to arrest defendant for a felony at the time the arrest was made. We, therefore, agree with the trial court’s conclusion that defendant escaped from “custody as a result of a felony” in violation of 13 V.S.A. § 1501(a)(2). See State v. Hollis, 161 Vt. 87, 93, 633 A.2d 1362, 1365 (1993) (“[T]he validity of an *300arrest hinges upon whether the officer had probable cause to arrest, not whether the officer articulated the correct basis for the arrest.”).
II.
Defendant next argues that the current state’s attorney breached a deferred-sentence agreement entered into by a previous state’s attorney approximately one year before the case at bar was prosecuted. Defendant argues that, as a result of the breach, he is entitled to specific performance of the terms of the agreement. The State responds that defendant was the first to breach the agreement by subsequently filing a motion to dismiss the charges against him. We need not determine whether defendant’s filing of a motion to dismiss breached the agreement, however, because we find that defendant explicitly repudiated the deferred-sentencing agreement.
Deferred-sentencing agreements are authorized under 13 V.S.A. § 7041, which allows a court, after an adjudication of a defendant’s guilt, to defer sentencing and place the defendant on probation “if a written agreement concerning the deferring of sentence is entered into between the state’s attorney and the [defendant].” 13 V.S.A. § 7041(a); State v. Pierce, 163 Vt. 192, 194-95, 657 A.2d 192, 194 (1995). A deferred-sentence agreement is a contract and will be construed in accordance with contract law. State v. Murray, 159 Vt. 198, 205, 617 A.2d 135, 139 (1992); cf. State v. Duffy, 151 Vt. 473, 477, 562 A.2d 1036, 1038 (1989) (probation agreement construed as contract).
Defendant entered into a deferred-sentencing agreement on December 8, 1994, with the then state’s attorney. Pursuant to the agreement, defendant was given a period of one year to plead guilty to the offense and, after a preliminary sentencing investigation, the trial court would have decided whether or not to order a deferred sentence.3 Defendant, however, never pleaded guilty to the charge of escape. Instead, he decided to proceed to trial. In a “Motion in Opposition to Continue” dated and filed with the Essex District Court on March 22, 1995, defendant wrote, “I turned down a deferred sentence of which after one year the charge would be null and void. I did this because of the stigma attached to pleading guilty ... to a *301felony charge that doesn’t apply to the circumstances.” It was not until May 16,1996, that defendant moved the trial court to enforce the terms of the deferred-sentence agreement — more than five months after the agreement had expired. We hold, therefore, that defendant repudiated the agreement and cannot now seek to enforce it.
Affirmed.
13 VS.A. § 1501(a)(2) states, in relevant part, that a person who, while in lawful custody “escapes or attempts to escape from an officer, if the person was in custody as a result of a felony, shall be imprisoned for not more than ten years or fined not more than $5,000.00, or both.” (Emphasis added.)
The defendant in Janis was convicted of shoplifting and felony escape, the latter based on the defendant’s prior criminal record, of which the arresting officer was unaware at the time of the warrantless arrest. The court on appeal held that the State was limited by what the arresting officer knew at the time of the arrest, stating:
*299In the case now before us, the Commonwealth urges us to use the grading section of the retail theft statute, which determines the sentence there to be applied, and bootstrap that grading section onto the grading section of the escape statute. This would result in our declaring it to be a felony when one walks away from a negligently attached handcuff while being held for shoplifting $38.96 worth of goods. We decline this invitation.
583 A.2d at 498.
The trial court would not have been bound to accept the deferred-sentence agreement. See Pierce, 163 Vt. at 197, 657 A.2d at 195-96 (trial court has final say whether to accept or reject agreement).