Virginia’s economic development agency has risen to the top of a national site-selection ranking, just two years after the state overhauled the once-maligned organization.

Site Selection magazine awarded Virginia its Prosperity Cup as “the most competitive state-level economic development group” in the country, thanks in large part to winning the HQ2 sweepstakes for Amazon’s new $2.5 billion headquarters in Arlington County and a $3 billion expansion of Micron Technology’s semiconductor factory in Manassas.

The award, announced by Gov. Ralph Northam on Thursday, draws the state closer to one of the goals set by Stephen Moret when he became president and CEO of the Virginia Economic Development Partnership at the beginning of 2017 — get the organization back into the top national rankings for competitive effectiveness.

“We don’t look at this as the finish line, but rather positive recognition for the progress we’ve made,” said Moret, former secretary of economic development in Louisiana.

He arrived in Virginia as the General Assembly and then-Gov. Terry McAuliffe prepared to reorganize the quasi-state agency to correct serious problems in its operations and governance that had been identified by the Joint Legislative Audit and Review Commission in a devastating report at the end of 2016.

Northam called the Site Selection ranking “a powerful testament to Stephen Moret’s leadership and his team’s commitment and strong collaboration with state, local and regional allies.”

One ally is the Virginia Chamber of Commerce, a statewide business organization that has worked closely with Moret and his newly restructured board of directors to turn the partnership around.

“He has transformed the organization into one of the most effective economic development forces in the country,” chamber President and CEO Barry Duval said Thursday. “He’s done it in a short period of time — it’s a credit to the support he’s gotten from his board.”

VEDP also has worked closely with members of the General Assembly who helped to reshape the organization and oversee the state’s successful incentive packages for the Amazon and Micron projects.

“If we had not restructured VEDP, we would have had no chance of getting Amazon,” House Appropriations Chairman Chris Jones, R-Suffolk, said Thursday.

Jones and Sen. Frank Ruff, R-Mecklenburg, carried the legislation that restructured the partnership in 2017 and set the stage for broader state investments in workforce training, site development and marketing.

Moret said the partnership is still not best in the country in some areas, such as marketing, preparing sites for quick development, and providing custom programs to deliver skilled workers to major employers who move to Virginia or expand operations here.

But the budget that takes effect July 1 includes substantial new funding for all of those initiatives, which VEDP says are necessary to ensure economic growth in all regions of the state, another top strategic goal.

“This is a really big opportunity, particularly when you talk about the smaller metro areas and the rural regions,” Moret said. “We definitely don’t want to take our foot off the pedal.”