Westeros and a galaxy far, far away are colliding! “Game of Thrones” breakout Emilia Clarke is joining the “Star Wars” Han Solo spinoff.

Clarke will star opposite Alden Ehrenreich and Donald Glover, who play Solo and fellow smuggler Lando Calrissian, respectively.

All three leads endured grueling testing sessions for the standalone pic. The tests date back to the beginning of the year when thousands of actors first began meeting and reading for the role of the title character that Ehrenreich eventually nabbed.

“Selma” and “Creed” star Tessa Thompson, “Power Rangers” actress Naomi Scott, and Zoe Kravitz read for the female lead in October. Another group, which included Clarke, “Dope’s” Kiersey Clemons, fellow “Thrones” actress Jessica Henwick, and “Emerald City” star Adria Arjona tested in London. Clarke ultimately landed the role.

Execs and directors Phil Lord and Chris Miller, who are also penning the script, had tested another group in September, but decided on one more round after struggling to make their choice.

The movie will be set prior to “Star Wars: A New Hope,” like the other upcoming “Star Wars” standalone project, “Rogue One,” which hits theaters on Dec. 16.

Kathleen Kennedy and Allison Shearmur are producing the standalone film, which is expected to begin production in January. The film is slated to hit theaters on May 25, 2018.

The latest movie in the expanding blockbuster franchise, “Star Wars: The Force Awakens,” opened in December of 2015, and has hauled in almost $2.1 billion worldwide.

As for “Game of Thrones,” insiders on the show indicate that most of the major cast members will finish shooting by the end of the year. This season has a shorter episode count then previous ones; therefore Clarke’s involvement in season seven will not affect the Han Solo shoot, or vice versa.

When Clarke isn’t filming “Game of Thrones,” the hit HBO drama that recently earned her a third Emmy nomination for outstanding supporting actress in a drama series, she’s been appearing on the big screen. She starred as Sarah Connor in “Terminator Genisys” in 2015, and in “Me Before You,” which bowed in June and grossed $207.5 million worldwide on a $20 million budget.

Clarke is repped by CAA and Emptage Hallett.