Top Gear is one of 2Entertain's big success stories
BBC Worldwide - the commercial arm of the BBC - has agreed to pay £17m to secure full ownership of DVD publishing firm 2Entertain.
It is buying the 40% of 2Entertain which it did not already own from the administrators of failed High Street giant Woolworths.
BBC Worldwide said the move "ended a period of uncertainty triggered by the collapse of Woolworths".
Programmes published by 2Entertain include Planet Earth and Top Gear.
"This ensures that consumers can continue to enjoy their favourite BBC titles on DVD and Blu-ray as well as protecting the investment made by BBC Worldwide in 2Entertain over the past six years," BBC Worldwide added.
It said the funds for the deal did not come from television licence fees. and that the sale offered stability to 2Entertain's retail partners.
Paul Dempsey, boss of 2Entertain, said the firm looked forward "to a more settled period and playing an important role in BBC Worldwide's future plans".
Woolworths entered administration in November 2008 with debts of £385m.
But the DVD publishing firm did not go into administration and remained profitable throughout.