RICHMOND — Virginia’s National Guard will provide health insurance and other benefits to same-sex couples, Gov. Robert F. McDonnell said Thursday, one day after a state delegate urged him to defy a new Pentagon directive to treat all marriages equally.

In a letter to McDonnell this week, Del. Robert G. Marshall (R-Prince William) warned that providing the benefits would violate the state constitutional ban on gay marriage.

“As Commander of the Virginia National Guard[,] what will you do to secure that the spirit and letter of the [state] Constitution regarding marriage will be upheld?” Marshall wrote.

McDonnell, a social conservative who has walked a fine line on gay-rights issues as governor, said he would abide by the Pentagon policy that Defense Secretary Chuck Hagel announced in August.

The policy came in response to a Supreme Court decision striking down a portion of the Defense of Marriage Act. The high court ruling requires the federal government to provide legally married gay couples with the same federal tax, health, Social Security and other benefits provided to heterosexual couples.

“Our position is, we’re going to follow all of the Department of Defense rules and regulations and policies,” McDonnell told a gathering of reporters after an unrelated event on Capitol Square. “Ninety percent of the funding for the state National Guard comes from the federal government, so we intend to follow all of the DOD guidelines.”

Marshall sent the letter to the governor after seeing a news report about the Texas National Guard, which has said it will not provide benefits for same-sex couples because doing so would conflict with the Texas Constitution and the state’s “Family Code.”

McAuliffe’s campaign issued a statement in support of McDonnell’s stance.“Terry agrees with Governor McDonnell that we should follow the federal policy,” McAuliffe spokesman Josh Schwerin said. “We shouldn't be discriminating against anyone because of their sexual orientation.”

Cuccinelli declined to take a position when asked about Marshall’s request in Richmond, after an appearance at Virginia Commonwealth University. “ I haven’t really been able to look at it [Marshall’s letter] yet,”  he said. “I’m not really prepared right now to answer that.”