Wal-Mart has signed a lease for a store at Skyland Town Center, the D.C. mayor’s office announced Tuesday, marking the final step in a protracted effort to bring the big-box retailer to Southeast Washington.

Located at the intersection of Alabama Avenue and Good Hope and Naylor roads, the store is to serve as an anchor for the ­District’s plan to revitalize the deteriorated town center.

Mayor Vincent C. Gray (D) said in an interview that he was “ecstatic” about the signing of the lease, more than nine months after holding a groundbreaking ceremony at the site in Ward 7.

Gray said the signing came after near-daily personal engagement on the issue. In a radio appearance last week, he said a real estate codicil left over from a former Safeway supermarket on the Skyland site was the last remaining sticking point in the negotiation.

“It sends a powerful message that Wal-Mart is committed to Skyland and to the east end of the city,” he said Tuesday. “I just wanted to get it done. I didn’t want anyone to think that we were anything but honest in purpose.”

The Wal-Mart store at First and H Streets NW in Washington. (J. Lawler Duggan/For Capital Business)

Bringing Wal-Mart to Skyland has been a key part of Gray’s administrative agenda in his home ward. Plans to redevelop the center — one of the largest real estate projects in a D.C. neighborhood east of the Anacostia River — have been in the works for more than a decade. It is envisioned as a mixed-use town center by the developers, the Rappaport Cos. and William C. Smith & Co. The city has invested $40 million in the project so far.

Gray once went so far as to deliver an ultimatum in a meeting with Wal­­-Mart officials at a 2011 real estate convention in Las ­Vegas: If the chain wanted to enter the District at all, it had better commit to opening at Skyland.

Still, the project almost stalled last year as officials debated a bill to raise the minimum wage for big retailers. Wal-Mart threatened to pull out of Skyland if that happened, but Gray vetoed the bill.

Skyland is one of four Wal-Mart sites in the District, two of which opened last year. The fourth is set for Fort Totten in Northeast.

“We look forward to being the anchor tenant at Skyland and continuing to offer D.C. residents both good jobs and convenient access to affordable merchandise and fresh food east of the river,” said Amanda Henneberg, a spokeswoman for Wal-Mart.

Mike DeBonis contributed to this report.