An Oregon man claims he got royally screwed by Burger King — because the fast-food chain yanked its promise of meals-for-life as a consolation for getting trapped in one of its bathrooms.

Curtis Brooner is suing the Home of the Whopper for the value of the delicious deal — which his lawyers say is $9,026.16 — over the “embarrassing” debacle, according to the complaint filed on New Year’s Day.

The 50-year-old’s beef began Dec. 15 when he dined at the Wood Village restaurant and then used the restroom.

Brooner became trapped when the bathroom door wouldn’t open, so he called the location on his cellphone to get help.

“It’s the kind of place where you hold your breath: Go in and get out of there as fast as you can,” Brooner, a registered sex offender, told Oregon Live. “That wasn’t an option for me.”

Employees slid a fly swatter under the door, which he desperately tried using to jiggle the lock open, but instead wound up cutting his hand.

Brooner was forced to sit tight for an hour after a locksmith was called — but said he could hear “Burger King employees and customers laughing while he remained locked inside.”

Once he was freed, he said, he was given a Band-Aid and ointment for his injured hand — and a meaty offer he couldn’t refuse.

“[A manager] said, ‘Yeah, man. We understand it’s a terrible situation and we want to make it up to you,’” Brooner said, referring to the free-meal deal.

For nearly two weeks, Brooner chowed down on complimentary burgers every day — with the exception of Christmas Eve and Day — and he even twice enjoyed breakfast and dinner there.

The location was convenient, he said, because it was just one stop off the highway from his job in Troutdale.

But on Dec. 28, he learned there really is no such thing as a free lunch.

Employees told him that “district management” had nixed the agreement.

In addition to breach of agreement, Brooner accuses Burger King of negligence for failing to fix the busted bathroom, saying in the suit that the “door showed signs of damage caused by other people who had previously been locked inside the bathroom.”

His lawyers want the Miami-headquartered chain to cough up the $9,026.16. They calculated that number by assuming Brooner will live to be 72 years old and eat one Whopper meal worth $7.89 per week until then.

Brooner was convicted in 1994 of first-degree sexual abuse and first-degree sexual penetration and sentenced to about 6½ years in prison, according to Oregon Live. He was required to register as a sex offender for life.

He told the site that the conviction is 25 years old and that he’s been a law-abiding citizen with no other convictions ever since.