A Central Otago teenager has been convicted of burglary after his DNA profile was linked to a gob of spit he left at the crime scene nearly three years ago.

Ethan Stanley Fredrick Millhouse, 18, appeared in Alexandra District Court yesterday and admitted a charge of burgling the Alexandra Rugby Club rooms on June 16, 2008, the Otago Daily Times reported.

Millhouse, aged 15 at the time, and a group of young people broke into the clubrooms to get to the coolstore but were unable to open the door and nothing was taken, Prosecutor Sergeant Paul Knox said.

Millhouse spat on the ground and police took a swab of the spit.

They were able to match it with a DNA sample Millhouse volunteered when he turned 17.

In court yesterday Millhouse also admitted to driving while disqualified at Clyde on December last year.

Judge Colin Doherty sentenced him to 60 hours' community work on both charges and disqualified him from driving for six months.