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.

Testimony and video showed that around 8:55 a.m. on August 17, 2015, Funk walked past two long lines at the Wawa and left with a bag of sunflower seeds, a Sizzli breakfast sandwich, a 20-ounce Gatorade and a 12-ounce coffee.

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."

The state had argued that while Funk was not on duty at either job at the time, a public employee "was subject to the forfeiture of current employment if convicted of an offense involving dishonesty," according to a news release from the Atlantic County prosecutor's office.

The state also referenced a 2014 incident in which Funk was suspected of stealing $55 from a home during a fire call but never disciplined, which the judge said was properly considered.

Funk was convicted of shoplifting by Egg Harbor Township Municipal Court Judge H. Robert Switzer, who fined Funk $150 plus costs and ordered him to serve ten days of community service. He also first ordered that Funk forfeit his employment as a firefighter and lifeguard for the City of Margate. Funk appealed.

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.