A Kenyan appeals court has rejected a pay rise of up to 60% previously awarded to the country's teachers by an industrial court.
The court found that the labour and employment court lacked jurisdiction to rule on the matter.
The teacher's union said they would appeal to the Supreme Court.
This ruling will be seen as a victory for the government which has always said it could not afford such a large salary.
The appeals court ruled that the country's Salaries and Remuneration Commission has to be consulted before any offer is made to teachers or workers in public service.
It also said it was wrong for the employment court to ask the government to hold talks with the teachers' union when teachers were on strike.
The dispute over teachers' pay goes back 18 years, with teachers saying a pay deal struck in 1997 was only partially fulfilled.
The government maintains that "the award has been settled in full".
The disagreement has involved several strikes and court cases.
Kenya faces a budget deficit of 8.7% for the year starting 1 July, a slight rise on 7.8% last year.
The deficit - along with other factors, such as a strong dollar - have led to falls in the Kenyan currency, the shilling.