A federal labor board, weighing a closely watched test case of the nation’s new law to protect corporate whistleblowers, has upheld an order to a tiny Virginia bank to reinstate a fired executive, while giving the company a chance to appeal.

The ruling prolongs a more than three-year battle of wills pitting Cardinal Bankshares Corp. — a holding company for the Bank of Floyd in southwest Virginia — against David Welch, the former chief financial officer fired by the company after he criticized its accounting practices.