BAGHDAD — Iraq’s Parliament has confirmed Prime Minister Adel Abdul Mahdi’s new government while leaving key cabinet posts unfilled.

The legislature voted early on Thursday to confirm 14 of Mr. Abdul Mahdi’s 22 cabinet nominees, giving him the ministers he needs to convene his government. But the body failed to vote on important appointments, including ones for the ministers of defense, justice and interior. Those portfolios will be held by the prime minister until a later date.

Mr. Abdul Mahdi and the 14 confirmed ministers were sworn in immediately after the vote.

Mr. Abdul Mahdi is a former vice president who has previously served as minister of oil and minister of finance. He was named prime minister this month and had 30 days to form a new government or lose his appointment.

The new prime minister is widely seen as a capable technocrat. He is unaffiliated with any party and has a reputation for secularism. The choices for the new Iraqi leadership suggest that the country could finally be edging away from the sect- and party-based system that has driven its politics and fomented bloodshed since the American invasion in 2003.