Image caption Shepard Fairey created the "Hope" poster during Barack Obama's 2008 election campaign

The US artist who created the well-known "Hope" poster featuring President Barack Obama has been given two years probation and fined $25,000 (£15,000) in a criminal contempt case.

Shepard Fairey pleaded guilty in February to destroying documents and fabricating evidence in his legal battle with Associated Press (AP).

He had based his poster on an AP photo and later tried to hide the evidence.

Mr Fairey was spared jail but will do 300 hours of community service.

The charge carries a maximum custodial sentence of six months.

'Fear and embarrassment'

The Los Angeles-based artist sued AP in 2009 after it accused him of violating copyright laws by reproducing their image of Barack Obama on his poster without crediting the news agency.

He sought a court declaration saying he had not violated AP's copyrights and that his use of the image fell under fair-use laws.

The case was settled out of court before a decision was reached, with Mr Fairey agreeing to pay an undisclosed amount of compensation and the two sides agreeing to share the rights to make posters and merchandise bearing the "Hope" image.

A criminal case was then brought against him on a charge of criminal contempt for trying to conceal evidence relating to his use of the image.

In a statement released after the court case on Friday, the artist said: "My wrong-headed actions, born out of a moment of fear and embarrassment, have not only been financially and psychologically costly to myself and my family, but also helped to obscure what I was fighting for in the first place - the ability of artists everywhere to be inspired and freely create art without reprisal."

AP President and CEO Gary Pruitt said the company was "glad this matter is finally behind us".

"We hope this case will serve as a clear reminder to all of the importance of fair compensation for those who gather and produce original news content," he added.