For years, New York City has lagged behind the state in awarding government contracts to firms owned by women or minorities.

But with last-minute legislation having passed both houses in the state Legislature, city officials are optimistic that they’ll be able to close the gap – as long as Gov. Andrew Cuomo signs the bill into law.

“We’re really excited that both the Senate and the Assembly passed groundbreaking legislation that expands New York City’s authority to improve our MWBE program,” New York City Deputy Mayor Richard Buery told City & State this week. “As you know, the mayor announced really ambitious goals last fall to increase utilization of MWBEs to 30 percent, and this bill will help us go a long way toward doing that.”

RELATED: Why New York should support MWBEs

The legislation, sponsored by state Sen. Marisol Alcantara and Assemblywoman Alicia Hyndman, would give the city more leeway in awarding small contracts without as many bureaucratic hurdles by raising the discretionary limit to $150,000, up from the current $20,000 threshold. The news was reported last week by the Observer.

“It really allows us to increase opportunity, and to direct opportunity towards firms that we think are ready to do the work, but that may not have the same resources or experience as other firms,” said Buery, who oversees the city's efforts to contract with women- and minority-owned companies. “So it’s an important tool for having a robust MWBE program.”

The bill would also give the city more flexibility by award contracts based on “best value” contracting, which can include factors such as a history of good labor relations or local hiring, Buery said.

Now it will be up to Gov. Andrew Cuomo to decide whether to sign the bill, which has yet to be sent to his desk.

“We know that the governor has been extremely supportive of increasing opportunity for MWBEs,” Buery said when asked if he expects the governor to sign it. “He’s been a big champion of the state program, so we’re really excited to make sure the bill gets to his desk and gets signed.”

RELATED: Preventing nonprofit properties from falling to private capital

Alcantara, the state Senate sponsor, announced passage of the bill on Facebook on Wednesday, the final schedule day of the state legislative session.

While both New York City and the state now have 30 percent targets, the city’s MWBE contracting has languished far behind. When New York City Comptroller Scott Stringer issued his annual report card last fall, it found that only 4.8 percent of the city’s $15.3 billion procurement budget went to MWBEs in fiscal year 2016 compared to 5.3 percent the year before.

The de Blasio administration has cited its own figures, however, finding that its share of MWBE contracting rose from 8 percent to 14 percent, well on its way to the 30 percent target. The administration’s measure only includes agreements in industries explicitly covered by a law governing the MWBE program, while the state measure is more comprehensive.

By contrast, slightly more than 25 percent of all state contract dollars went to minority and women-owned business enterprises, or MWBEs, according to report from Empire State Development this past fall. Cuomo set a goal of 30 percent at the annual MWBE conference in 2014.