Sarah Palin said "bad behaviour" must have consequences

US politician Sarah Palin has testified against a former student charged with breaking into her e-mail account.

Mrs Palin told the court that the main way she communicated with her family during her 2008 vice-presidential campaign had been compromised.

David Kernell, 22, is accused of identity theft and fraudulently gaining access to her Yahoo account. His lawyer said the case was a prank, not a crime.

Mr Kernell, from Tennessee, could face up to 50 years in jail if convicted.

Asked by reporters if she thought the charges were excessive, Mrs Palin said: "I don't know, but I do think there should be consequences for bad behaviour."

Mrs Palin told the court in Knoxville, Tennessee, that she had used her Yahoo e-mail account and a Blackberry almost exclusively to communicate with her family in Alaska while campaigning on the Republican ticket in 2008.

Earlier this week, her daughter Bristol testified that she had received harassing calls and text messages after screen shots of e-mails from the account revealed her mobile phone number.

In recent months Mrs Palin has been a prominent leader in the conservative Tea Party movement, which has opposed President Barack Obama's health reforms and called for tax cuts.