Gov. Bob McDonnell (R) said Tuesday that a new Washington Post poll showing that Virginians are closely divided over whether gay marriage should be legal doesn’t matter because voters overwhelmingly agreed to amend the state Constitution to ban gay marriage just five years ago.

“The people of Virginia have spoken by a margin of 57-43,’’ McDonnell said during a press conference call from Shanghai — a stop on an 11-day trade mission.

“They’ve already enshrined in the Virginia Constitution that gay marriage is not permitted, so unless there is another effort to change the Constitution, that matter is settled. That is the law of the land and, look, reasonable people can disagree on these things. That’s what the law is now. That’s something that I support. That was the right decision.”

Forty-seven percent of Virginians say gay couples should be allowed to legally wed, and 43 percent are opposed, according to the poll. In 2006, 57 percent of voters agreed that Virginia should add language to the state Constitution prohibiting marriage — or any approximation of the institution, including civil unions — between same-sex couples.

The poll also said Virginians are far more optimistic about the direction of the state than that of the nation, and they are generally pleased with the performance of most of their elected officials. Sixty-two percent approve of the way McDonnell is handling his job, prompting some to call for him to be on the national ticket next year.

“It’s nice to see approval rating in that area,’’ McDonnell said. “I think it’s because at the state level I think what we have been trying to do while I’ve been governor is to cut down the rhetoric, focus on problem solving, bringing Democrats and Republicans together to solve problems and get results and that’s what people want out of government.”