BARCELONA — Ewan McGregor is to receive the San Sebastian Film Festival’s Donostia Award for career achievement.

The thesp will attend the Spanish event for the European premiere of Juan Antonio Bayona’s “The Impossible,” which screens out of competition. McGregor plays opposite Naomi Watts in the family drama set in Thailand during the 2004 tsunami.

“Impossible” will be released Stateside by Lionsgate on Dec. 21. Summit Entertainment has sold the film near worldwide. It is produced by Spain’s Apaches and Telecinco Cinema.

Announcing the award Tuesday, San Sebastian execs called McGregor one of the finest stars of his generation, who demonstrates his versatility “across a multitude of genres styles and scope.”

McGregor’s credits include Danny Boyle’s “Trainspotting,” Roman Polanski’s “The Ghost Writer,” Lasse Hallstrom’s “Salmon Fishing in the Yemen” and Bryan Singer’s “Jack the Giant Killer.”

Previous recipients of the award include Julia Roberts, Michael Caine and Richard Gere.

The award ceremony takes place on Sept. 27. Fest runs Sept. 21-29.