Hours after starting his new job, a junior minister in Prime Minister Alexis Tsipras' left-wing government resigned late Wednesday over messages posted on his Twitter account that were considered racist and anti-Semitic.

Dimitris Kammenos, a deputy minister for infrastructure, submitted his resignation hours after Tsipras' new Cabinet was sworn in.

The 49-year-old Kammenos is a member of parliament from the Independent Greeks, a small right-wing party that joined the new coalition government after a general election was held Sunday.

Kammenos said offending comments posted in 2014 and 2015 on his account — which has now been canceled — were being investigated at his request by the police's cybercrime division. He added that several members of his staff had helped run the account.

The resignation was an embarrassing start for Tsipras, who won a surprisingly comfortable election victory but now faces a major challenge in implementing the harsh terms of a third international bailout.