"Yes, it's true," McKellen told Empire magazine. "It's not a part that you turn down. I loved playing Gandalf."
Mexican filmmaker Guillermo del Toro is to direct the "Hobbit" films, which lead up to Jackson's "Lord of the Rings" trilogy. The new movies are to be released in 2010 and 2011, the BBC said.
The "Lord of the Rings" movies and one of the "Hobbit" films are based on the fantasy novels of author J.R.R. Tolkien.
The second "Hobbit" flick will be an original story set in the 60 years between the ending of the "Hobbit" book and the beginning of the "Rings" trilogy, the BBC said.
"I spoke to Guillermo in the very room that Peter Jackson offered me the part and he confirmed that I would be reprising the role," McKellen told Empire.
"As to how it's going to work over two films and what going to happen on screen, well Guillermo has not got down to working out the major details yet -- I can tell you it's going to be amazing though."
Swim Week Miami Beach 2014 [PHOTOS]