The Government has confirmed it has reached an agreement to buy almost 5,000 acres of the Dublin mountains.

The area will become part of the Wicklow Mountains National Park.

The lands had been at the centre of controversy after they were put up for sale by NAMA.

The inclusion of the area, known as the Featherbeds, will bring the total size of the National Park to 22,000 hectares.

The National Parks and Wildlife Service of the Department will work with Dublin Mountains Partnership to manage this new acquisition.

Announcing the purchase, Regional Economic Development Minister Michael Ring did not disclose the price paid but claimed Nama acted in the national interest.

"The Featherbeds are an important area for nature conservation and for public amenity," he said.

"Their acquisition by the state is a sign of our enduring commitment to preserve our natural heritage for future generations of citizens and visitors alike to enjoy."

The Green Party last week presented a petition to the government signed by more than 20,000 people calling for the lands to be retained in public ownership.

Eamon Ryan, Green Party leader, said the sale was great news.

"This was a once-in-a-lifetime chance to protect a large area of the Dublin Mountains for the hundreds of thousands of walkers and nature lovers who value the uplands as one of the great things about our capital city, and we're glad that sense has prevailed," he said.

"Nothing will change immediately with respect to the site, in terms of land access etc, but we now have certainty, and a real opportunity to develop this area into one of the finest attractions in the country."

The National Parks and Wildlife Service will work with Dublin Mountains Partnership to manage the new 4,900-acre parkland.

The Wicklow Mountains National Park attracts more than a million visitors every year.