An internal affairs investigation has been opened into Police Officers Federation of Minneapolis President Lt. Bob Kroll who offered a steak dinner for the arrest of vandals caught defacing union ­headquarters.

The move violated the department’s code of conduct and the ethics code for all city employees, a top-ranking police official said in an e-mail obtained by the Star Tribune.

Department spokeswoman Sgt. Catherine Michal confirmed that an Internal Affairs investigation is underway, but could not comment further because it’s a personnel matter.

In an e-mail to members, Kroll, who has frequently sparred with department brass since taking over the union that represents the city’s rank-and-file officers two years ago, said that the parking lot of the Federation building in northeast Minneapolis “has been getting tagged with graffiti.”

“We just put a new parking lot in that looks very nice. We want to keep it that way,” Kroll wrote Monday afternoon in an e-mail to officers in the ­Second Precinct, where the headquarters is located. “Until then please provide extra patrol overnights, particularly on weekends. Feel free to camp out in the lot while writing reports etc.”

“I’m offering dinner and drinks for two at Jax [Cafe] for any arrest made of the individuals responsible,” he added.

Lt. Bob Kroll, president of the Minneapolis Police Union, has frequently sparred with MPD brass.

In an e-mail sent three hours later, in which Kroll was copied, Deputy Chief Travis Glampe asked Second Precinct Inspector Todd Loining to inform all of the officers under his command that “this is (a) violation of the Code of Conduct, the City’s Ethics policy and the City’s Electronic Communication Policy.”

“No one can accept any remuneration in exchange for extra patrol or an arrest,” Glampe wrote. “If Federation President Kroll is desiring extra Patrol he will need to reach out to the precinct and make that request like any other business owner, and without the offer of police services in exchange for gifts. While we certainly respect the need for extra patrol at a location being hit by graffiti, it is not acceptable to offer payment for such ­on-duty police services.”

A few hours later, Kroll shot back, writing “First, I am not a business owner,” and then added that his earlier message was addressed to the department’s rank-and-file officers since in “essence it’s their property being ­damaged.”

He asked Glampe to “explain to me how this is any different from precinct inspectors that offer incentives in the form of gifts for officers that lead the shift in curfew arrests, for officers that find hidden items in alleys doing patrols.”

“These types of incentive games are played by precinct commanders to get productive work of officers and is long-standing,” Kroll wrote. “How is this any different?”

Kroll added that, as a police supervisor, he has the ability to use department e-mail to notify officers of a crime trend.

When reached for comment Friday afternoon, Kroll stood by his comments, calling the internal probe part of a “continual pattern of harassment that they use to try to” silence him.

He said it was hypocritical for the department to come down on him for his offer, while ignoring the off-the-books practice of commanders giving officers days off and gifts such as “high-end knives” for the number of curfew-related arrests they make.

Since succeeding John Delmonico, Kroll has been a staunch defender of officers, frequently going head-to-head with Chief Janeé Harteau and her administration.

His outspokenness has sometimes landed him in trouble.

Last month, Mayor Betsy Hodges blasted Kroll for his “jackass remarks” when he called the Minnesota Lynx’s attendance record “pathetic” after four Minneapolis officers walked off the job while working security at a Lynx game. Several of the team’s players had criticized racial profiling by police and wore warm-up jerseys that said “Black Lives Matter.” Harteau later ordered Kroll to stop wearing his uniform at news conferences while representing the union.

Kroll’s backers argue that he has been a vocal supporter of officers at a time when their actions are being scrutinized as never before.

Closing his e-mail to Glampe, Kroll seemed to predict the Internal Affairs investigation.

“Go ahead and open the IA case. I look forward to it,” he wrote. “You guys may set me up with an early retirement with this continued ­harassment.”