Average farm incomes in Scotland have risen to the highest levels on record, with agricultural activity alone being profitable for the average farm.
Farm income is estimated to be £69,100 in 2022-23, rising by £14,600 from the year before, according to the Scottish government's Farm Business Survey.
The upturn in prices, published by the Chief Statistician, was mostly driven by increases in cereals, milk, and livestock output, reflecting strong wholesale prices.
However, total input costs increased 12 percent to £262,400 for the average farm, according to the report which looked at 400 farms.
Increasing prices of agricultural inputs such as feed, fuel and fertilisers were seen for a second year.
The Chief Statistician said: "Average income increased to its highest level since 2012-13, after adjusting for inflation
"For the first time since 2012-13, when these records began, agricultural activity alone is profitable for the average farm."
General cropping farms saw the strongest growth, with average incomes rising by 83% to £167,100, its highest value.
Income for average dairy (£248,700), cereal (£99,700), and mixed (£85,700) farms were also at record values in 2022-23.
However, income fell for livestock farms on average. Livestock farms, which make up 60% of commercial farms, continue to make losses on average.
Rising costs exceeded smaller increases in output. Only Less Favoured Areas (LFA) cattle farms saw income grow compared with the previous year.
Livestock farms continue to be more reliant on support payments to make a profit. Sheep farms in less favoured areas were the least likely to make a profit without support.
Only 8% of these farms would have made a profit in 2022-23 if support payments were excluded, according to the Chief Statistician's report.
In 2022-23 total average output increased by 19% to £280,300. Farms on average received £46,300 in support and made £5,000 from diversification, like renting out farm buildings.
The results are calculated from the 2022-23 Farm Business Survey, which covered the 2022 cropping year and the 2022-23 financial year.