Ashton Funk was once the king of the beach, a perennial rowing champ for Margate in the summer Lifeguard races,  and a firefighter with the Margate City Fire Department.

But a $7.98 shoplifting conviction that Funk, 34, claimed was nothing more than a misunderstanding stemming from a long line at the Margate Wawa will force him to give up both jobs, a judge ruled Wednesday.

Atlantic County Superior Court Judge Bernard E. DeLury Jr. denied Funk's appeal of a lower court ruling requiring him to forfeit his jobs as both a Margate city firefighter and 18-year-member of its beach patrol.

DeLury noted that Funk, while off duty, was wearing an official Margate City Fire Department hat and Margate Beach Patrol shorts. He was about to start his shift at the fire station.

"These positions, particularly in the close-knit beach communities of our County, are held in high esteem," DeLury wrote. "Such a person must adhere to the highest standards of conduct."

DeLury upheld the conviction and said in his ruling that  "At all relevant times, the defendant was employed by Margate City as a firefighter and a member of the beach patrol," and that "the defendant now having been convicted of an offense involving dishonesty ... shall immediately forfeit his positions of employment with Margate City."

The shoplifting took place in August, 2015, and was observed by a police lieutenant from nearby Longport, a rival of Margate's in the lifeguard races, also in the Wawa, who reported the alleged transgression.

The Longport officer, Lt. Joseph Baumgardener, confronted Funk in the parking lot after waiting in line and paying for his own items and seeing Funk walk out without paying, according to testimony. Funk told him someone let him cut the line.

At trial, Funk presented a witness who said he on occasion paid for Funk's food at Wawa. Funk had also stated that he heard a patron in the Wawa congratulate him that morning on the previous day's lifeguard races and say he would pay for Funk's food because of his performance, according to the judge's opinion.

DeLury noted in his opinion that if the defendant was indeed a Wawa regular, as he claimed, "he would have likely known that at least two of the items, the sunflower seeds and the Gatorade, had to be scanned, even if they were going to be paid for by someone else."

At the time, there was speculation that Funk was targeted because of his dominance in the South Jersey lifeguard races.

The Longport Beach Patrol won the South Jersey Championships last summer, held in Avalon.

Funk's attorney, Louis Barbone, did not immediately return a call for comment.

Barbone also represented another Jersey shore firefighter, Mike Tripician, of the Ventnor City Fire Department, who was reinstated by settlement with Ventnor Commissioners earlier this year after a DWI conviction in which his vehicle flipped over on the beach with his two children strapped to car seats inside. The children were not injured.