ATHENS — Prime Minister Alexis Tsipras called on Sunday for a vote of confidence in the Greek government, hours after a junior coalition partner announced that he would quit in protest of a deal to end a dispute with Macedonia over its name.

The move threw the country into new political turmoil, fueling speculation about possible snap elections, although Mr. Tsipras said his government aimed to complete its term into October.

The coalition partner, Defense Minister Panos Kammenos, who is also the leader of the right-wing Independent Greeks party, announced his resignation following talks at the prime minister’s residence.

“The Macedonia name issue does not allow me not to sacrifice my post,” the minister told reporters afterward. “ANEL is leaving the government,” he said, using the Greek acronym for his party.