The offence, under the Theft Act 1968, of either: (A) entering a building, part of a building, ship, or inhabited vehicle (e.g. a caravan) as a trespasser (R v Collins  QB 100) with the intention of committing one of three specified crimes in it (burglary with intent – Theft Act 1968 s 9 (1) (a); or (B) entering it as a trespasser only but subsequently committing one of two specified crimes in it (burglary without intent – Theft Act 1968 s 9 (1) (b). The three specified crimes for burglary with intent are (1) theft; (2) inflicting grievous bodily harm; and (3) causing criminal damage. In 2003 the offence of burglary with intent to rape was replaced by that of trespass with intent to commit a sexual offence (Sexual Offences Act s 63). The two specified offences for burglary without intent are (1) stealing or attempting to steal; and (2) inflicting or attempting to inflict grievous bodily harm. Burglary is punishable by up to 14 years' imprisonment. Aggravated burglary (Theft Act 1968 s 10), in which the trespasser is carrying a weapon of offence, explosive, or firearm (R v Kelly (1992) 97 Cr App R 245), may be punished by a maximum sentence of life imprisonment. The Crime (Sentences) Act 1997 provides for an automatic three-year minimum sentence for third-time burglars, although judges may give a lesser sentence if the court considers the minimum would be unjust in all the circumstances. See also repeat offender.