LONDON — Martin Freeman has joined the cast of Edgar Wright’s “The World’s End.” The British actor, who is soon to be seen in the title role of Peter Jackson’s “The Hobbit” trilogy, joins Simon Pegg, Nick Frost, Rosamund Pike, Paddy Considine and Eddie Marsan in the comedy.

“The World’s End,” written by Wright and Pegg, is the third part of the pair’s “cornetto” trilogy of comedies starring Pegg and Frost, following “Shaun Of The Dead” and “Hot Fuzz,” the latter of which also featured Freeman and Considine. Each film has taken a unique spin on an established genre with “The World’s End” described as “social science-fiction.”

Nira Park of Big Talk Pictures and Tim Bevan and Eric Fellner of Working Title Films are producing the film, which started shooting in Blighty this week. Universal Pictures International will distribute outside North America, with Focus Features handling domestic.

“The World’s End” sees five childhood friends reunite after 20 years. They are convinced to re-stage a legendary night of drinking by Pegg’s character, a 40-year-old man eternally trying to relive his teenage years. As they attempt to reconcile the past and present, they realise the real struggle is for the future, not just theirs but humankind’s.