Pop star Justin Bieber pleaded no contest to misdemeanour vandalism   for pelting a neighbour's home with eggs and was sentenced to two years probation, the Los Angeles County District Attorney said.

The 20-year-old Bieber, who was not present in Los Angeles Superior Court for his arraignment, was also ordered to pay $80,900 in restitution, serve five days community service and complete an anger management program in what the district attorney called a negotiated settlement.

"Justin is glad to get this matter resolved and behind him," Bieber's representatives said in a statement. "He will continue to move forward focusing on his career and his music."

The singer, whose hit songs include "Boyfriend," was accused of throwing eggs at a neighbor's home in an upscale Calabasas, California, neighbourhood during a dispute in January.

Investigators searched Bieber's home following the incident and arrested a friend, aspiring rapper Lil Za, for drug possession at the house.

The incident was the first in a string of arrests and legal problems for the former teen idol, who was later arrested and charged with driving under the influence in Miami Beach as well as being charged with assaulting a limo driver in Toronto.

It is not known how the sentence could influence the Miami Beach and Toronto cases.

The singer could have faced a felony charge if damage to the home was greater than $20,000.

Bieber has since moved from the gated community.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.