Scottish Executive ministers have been accused of using an accommodation allowance scheme to cash in on Edinburgh's property price boom.
Some ministers have bought and sold property in Edinburgh
Under the scheme, MSPs can claim up to £10,600 per year towards housing expenses if they live too far from Holyrood to commute.
Socialist MSP Tommy Sheridan said at least three ministers used the scheme to subsidise property speculation.
A parliament spokesman said MSPs had approved the scheme.
He said all the payments were within the rules and allowed MSPs who lived far from the capital to do their jobs properly.
Under the scheme, MSPs who live further away than a 90-minute train journey from Edinburgh can claim allowances to cover hotel bills, flat rentals or interest on mortgages on property bought for overnight stays.
Since 1999 the taxpayer has paid 11 executive ministers almost £340,000 towards the costs of the second homes they have bought in Edinburgh.
The average house price in the city has almost doubled over that period.
A number of ministers have bought flats, sold them and then used the profits to buy more expensive properties.
Mr Sheridan, a list MSP for Glasgow, said it was an "outrageous abuse of taxpayers' money".
He said: "The Edinburgh Accommodation Allowance was never meant to be a get-rich-quick scheme for any politician, let alone well-paid Cabinet ministers."
Mr Sheridan highlighted the cases of former deputy first minister Jim Wallace, Transport Minister Tavish Scott and the Deputy Minister for Enterprise, Allan Wilson.
Mr Wilson bought a flat in Edinburgh for £65,000 in 2000.
He sold it last year for £108,000 and has since bought another apartment for £238,000.
The deputy minister has been paid £34,000 towards the costs of his Edinburgh properties.
Mr Sheridan said: "We have got individuals like Mr Wallace, Mr Wilson and Mr Scott who each have received over £30,000 in taxpayer's subsidy and each have made over £30,000 in personal profit.
"That is a disgrace. That is a particular gravy train that has got to be brought to a stop."
The ministers named by Mr Sheridan declined to comment on the accusations.
But former Deputy First Minister Jim Wallace said the accusation of property speculation was "rubbish".
He told BBC Radio's Good Morning Scotland programme: "The options we've got are that if you buy a house the allowance relates to the interest on the mortgage, not any capital repayment, or you can rent a house, or you can go into a hotel.
"I've done the calculations. If I was renting or I was in a hotel, I would be costing the taxpayer considerably much more than I've actually claimed."
Mr Wallace pointed out that there were in the region of 40 MSPs who had claimed more than him, so he did not understand why Mr Sheridan was attacking ministers.
He also added that if MSPs opted to use the allowance scheme for their mortgage interest, they were not allowed to claim for any meals or food while they were in Edinburgh.
Senior executive ministers are paid almost £87,000, including their MSP's salary.