A hungry Slovenian politician has stepped down from parliament after admitting he stole a sandwich because he had been ignored by staff at the checkout counter for several minutes.

Darij Krajcic, 54, a member of the ruling List of Marjan Sarec List [LMS] party, told Slovenian media he went to a shop in Ljubljana, the country’s capital, to purchase some food but became annoyed after apparently being ignored by the staff, the BBC reported. Krajcic said he felt like he was being “treated like air.”

Krajcic said he was in a hurry at the time, and decided to test the store's security by walking out and shoplifting the sandwich. However, he ended up regretting the “social experiment.”

"So, I left the shop with the sandwich, walking slowly, very slowly," Krajic told Euronews.

SWEDEN FM SAYS SHE'S UPSET BY AMBASSADOR TO CHINA CASE 

He said that no employee appeared to notice.

Krajcic later told fellow parliament members about the sandwich incident and some lawmakers found it amusing, the BBC reported.

However, on Thursday, Brane Golubovic, the head of LMS’ parliamentary faction, said Krajcic’s actions were "unacceptable" and condemned them.

UK OFFICIAL VOWS TO PREVENT RETURN OF BRITONS WHO BACKED ISIS

"He took responsibility for it and resigned of his own accord," Golubovic told local media.

Krajic, who was elected in September, admitted he “made a mistake” and would make different decisions if he had a second chance.

CLICK HERE FOR THE FOX NEWS APP

"I wouldn't do it again if I could go back in time."