Najib Razak took over as prime minister on Friday
The Malaysian government led by new prime minister Najib Razak has won just one out of three by-elections.
Mr Najib's ruling coalition, led by the United Malays National Organisation (Umno), won a seat in the state parliament of Sarawak on Borneo Island.
But it lost a state parliament seat in Kedah, while in Perak the opposition scored won another seat in the national parliament in a landslide win.
Analysts said the results were a "rebuke" to Mr Najib's new government.
"Malaysians want change, irrespective of the new prime minister," said Anwar Ibrahim, who leads the three-member Pakatan Rakyat opposition alliance.
Punished in Perak
The most closely watched vote was in the northern state of Perak, where Mr Najib had been prominent in a recent power struggle which deposed the opposition-led state government of Nizar Jamaluddin in February.
Perak was one of five states that voted for the opposition in the March 2008 elections, in which the ruling party lost its two-thirds majority for the first time since the country's independence from Britain in 1957.
Voters there not only defeated the ruling party again, but increased the opposition's share of the vote.
"It is definitely a bruising for Najib," political analyst Shaharuddin Badaruddin was quoted as saying.
Although the results do not affect the national balance of power, the three constituencies were seen as useful snapshot of the national mood because they represent a cross-section of Malaysia including rural Malays, ethnic Chinese and Indians.
The government's win in Sarawak, where the government is the primary source of development funding, was expected, but the loss of Kedah will be more worrying for Mr Najib, analysts said.
"The feel-good factor from the power transition is still too new and has not sunk in," the prime minister's right-hand man, Muhyiddin Yasin, told reporters.
Mr Najib was sworn in on Friday, succeeding Abdullah Badawi.
He has already lifted recent bans on two opposition newspapers, freed 13 people detained without trial and promised a review of the controversial Internal Security Act.