The original Associated Press photograph is seen next to a poster of U.S. President Barack Obama by artist Shepard Fairey, who has admitted he doctored the photo for his work. (Mannie Garcia/Shepard Fairey/Associated Press)

Shepard Fairey, the artist who created the "Hope" image widely used by U.S. President Barack Obama's 2008 election campaign, was sentenced Friday to two years probation for destroying and fabricating materials in a lawsuit he had brought against The Associated Press over the image.

A U.S. district court in Manhattan also gave the 42-year-old artist 300 hours of community service.

"I'd like to apologize for violating the court's trust, which was the worst thing I've ever done in my life," Fairey said at his sentencing hearing.

The well-known "Hope" image was altered from an Associated Press photo, which triggered a legal battle between the artist and the news service.

The issue was settled out of court last year. In that settlement, the two sides agreed to share the rights to make posters and merchandise bearing the Hope  image. Court papers revealed that Fairey is required to pay the Associates Press $1.6 million, with an insurance company doling out $450,000 of that total.

Fair-use claim at issue

Frday's sentence relates to a civil suit Fairey brought against the news agency in 2009, in which he claimed he had used a different photograph. He also sought a ruling in which he said his work was protected from any Associated Press claims of copyright because of fair use, a legal doctrine which allows for limited use of copyrighted material without the permission of a rights-holder.

The news agency then countersued for copyright infringement.

Eventually, Fairey said he had used an original Associated Press photo and had tried to cover up his mistake.

The original picture was taken by AP photographer Mannie Garcia at a panel discussion at the National Press Club in Washington D.C. in April 2006, when Obama was still a U.S. senator from Illinois.

Prosecutors had told U.S. magistrate judge Frank Maas in Manhattan that Fairey had "both an ideological and financial motive" to alter evidence that favoured his case. They were seeking a six-month prison term for one misdemeanour count of criminal contempt.

'Intentional destruction of evidence'

"This was not a mere failure to preserve documents," the government wrote. "This was the intentional destruction of evidence and the intentional manufacture of false evidence. The defendant knew exactly what he was doing when he created the fake documents and sought to destroy the deleted documents."

Prosecutors noted in court that revenues at the three companies the L.A.-based street artist controlled doubled from roughly $3 million in 2007 to $6 million in 2009 – refuting Fairey’s claim he did not financially benefit from the artwork.

Fairey’s lawyers painted the artist as a devoted husband and father of two young daughters. They called his crime the "worst mistake of his life" and said he tampered with evidence not to "enrich himself but out of fear of embarrassment."

They also said that he had suffered much damage to his reputation because of the legal case.

Jay Pruitt, the president of The Associated Press, released a statement Friday saying that, "After spending a great amount of time, energy and legal effort, all of us at The Associated Press are 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."

With files from The Associated Press