Joel Ryan/Invision/AP 1 / 17
Joel Ryan/Invision/AP 1 / 17

NEW YORK (AP) — A former firefighter with a crush on Madonna has been sentenced to three yearsprobation for resisting arrest outside the singer's New York apartment building.

RELATED: After a rough ski trip, Madonna parties with Anne Hathaway

Robert Linhart was convicted in November after being twice arrested in September 2010.

Police say the then-59-year-old Linhart was nabbed after he parked his SUV outside the Material Girl's former Manhattan apartment and spray-painted love notes on poster boards. He returned a few days later and was arrested again.

RELATED: Voting: Are these looks age appropriate?

His attorney had argued that it was no crime to adore Madonna, the singer of pop hits including "Like a Virgin," who performed at last year's Super Bowl halftime game.

RELATED: The adoption option: Stars who've chosen to adopt

The judge on Wednesday also ordered Linhart to attend anger management sessions.

Attorney Lawrence LaBrew tells the Daily News that Linhart is appealing the conviction.