D.C. Mayor Vincent C. Gray (D) announced Friday the city now has enough money to keep its main library open seven days a week, heading off plans for it to be closed on Sundays.

In a statement issued just 48 hours before the Martin Luther King Jr. Library on G Street NW downtown keep its doors shut for the day, Gray said the administration had found $316,000 to keep it open on Sundays through fiscal year 2012.

“The library plays an important role in supporting education for students of all ages and providing job search and career assistance,” Gray said. “We are pleased we were able to identify funding to keep the Martin Luther King Jr. Memorial Library open on Sundays.”

In recent years, as the District has struggled to manage successive budget shortfalls, library spending fell from more than $45 million in 2008 to less than $35 million for 2012. About 100 staffers have been laid off.

To prevent even more layoffs, officials had said they had little choice but to close its main branch on Sunday.

The move outraged some civic and political leaders, including Council member Tommy Wells (D-Ward 6), the chairman on Public Works, Recreation and Libraries.

With neighborhood library branches already closed on Sunday, Wells and others noted that Downtown library had become a refuge for book lovers and job seekers during the weekend.

Gray, Wells and Chief Librarian Ginne Cooper will greet residents at the Martin Luther King Library Sunday when it opens at 1 p.m. It will close at 5 p.m.