Borders farmer and vet Nigel Miller has been elected as the new president of NFU Scotland at its annual general meeting in St Andrews.
He replaces Jim McLaren, who steps down after four years in the role.
Mr Miller will be supported by two vice-presidents Allan Bowie and John Picken, both from Fife.
He said there could be "no better job in Scottish farming" but added that he recognised he faced a "huge challenge" in a "crucial period" for the industry.
"For many of our producers, the shadow of a dysfunctional market hangs over many of them and much of the assistance we need as a sector is under threat as budgets are being stripped back," he said.
"The key funding source for Scottish farming remains the Common Agricultural Policy and the debate around reform at a European level is building momentum.
"I firmly believe the union has a pivotal role in moving us into a new and better era post-CAP reform in 2013."