He got the girl — and he got paid!

The high-school senior caught on camera locking lips with his hot-to-trot teacher won a bet with four of his buddies to see who would hook up with her first, The Post has learned.

Eric Arty, 18, beat his pals — who each ponied up $100 — to win the jackpot as well as the affections of glamorous global-studies teacher Julie Warning, 26.

“It was a bet with a group of his friends,” said Andrew Cabrera, a junior at Manhattan Theater Lab HS, where Warning worked until Tuesday, when she was reassigned to an administrative job.

“They gave him the $500 [pot],’’ Cabrera said, referring to Eric and the four other contenders who made their wager about three months into the school year.

Their romance was first reported yesterday by The Post — which ran a front-page picture of the duo smooching Friday at Bleecker Playground in the Village.

The case has been turned over to the Department of Education Special Commissioner of Investigations.

BROOKLYN HS DEALS WITH ITS OWN SEX SCANDAL

Cabrera dished yesterday that Arty began the race as a long shot. “He would go after class and basically try to seduce her,’’ he said. “I don’t know if she knew [about the bet]. They were all trying to get with her. One of his [Arty’s] friends flirted with her more than anyone — I thought he would be the one, but Eric came out of nowhere and got her.”

Other students described how Warning at first tried to resist the teenagers’ charms — throwing them out of her classroom when they would turn up to hit on her.

“He [Arty] would flirt with her,” said one junior who requested anonymity because school officials warned students not to talk. “She would try to avoid it because she was his teacher. She was a nice teacher and didn’t want to report him, and she would throw him and his friends out of class for trying to flirt with her,” the student said.

Arty’s friends showed up outside his Washington Heights home yesterday — with copies of the New York Post in hand — to salute their conquering hero, shouting, “Eric’s da’ man!”

The teacher bet was the talk of the school yesterday.

“This has probably been going on for a while now because the signs have been there,” said Maia Torruella, 16, a sophomore.

“The way they act together . . . When he walks into the room, her face lights up,’’ she said. “And when he’s gone, she’s boring. You can tell he’s still on her mind.

“They’re always so nice to each other. He flirts with a lot of girls, sure, but Miss Warning, ohhhhh!”

Warning was a no-show when she was supposed to report to her new desk job yesterday and could not be reached for comment.

“It’s my understanding that she did not show up to her reassignment center,” Schools Chancellor Dennis Walcott said.

“So we’ll do more investigating on why she hasn’t shown up.”

Warning, who does not have tenure and was appointed to her $48,434 teaching position in October 2010, could be fired.

“We’ll wait for him [the commissioner] and based on the investigation, we’ll make a determination after that,” Walcott said.

Warning would not face any criminal charges because her boy toy was over the age of consent. Arty, who is expected to graduate this year, does not face any discipline.

In March, 2011, Warning was involved in an incident in which a 10th-grader was suspended for making lewd comments and inappropriately touching her.

“It was properly reported and the student was disciplined,” a DOE spokeswoman said.

A month earlier she’d been pulled over on the Taconic Parkway in East Fishkill and charged with drunken driving. It was not immediately known how the case was resolved. A report in the Journal News said she blew a Breathalyzer reading above .08.

Meanwhile, the chivalrous winner yesterday continued to insist that Warning was not the woman he was photographed with in Bleecker Playground in Greenwich Village on Friday.

“It’s not my teacher,” he said.

“I feel bad for her,” he added, but refused to say who she was.

Additional reporting by Yoav Gonen, Georgett Roberts & Kate Kowsh