As the sun sank slowly over the James River Monday before last, hopes for passage of Gov. John N. Dalton's proposed statewide gasoine-tax increase sank with it. That afternoon, the House Finance Committee defeated a bill authorizing a 2-cents-per-gallon increase in the tax, and the proposal appeared dead.

But Del. Martin H. Perper, a second-term Fairfax Republican on the committee, had other ideas. His own gasoline-tax bill, calling for a 4 percent statewide increase, had been sitting on the committee docket unnoticed during the hubbub over the governor's proposal.

So when the committee adjourned after killing the Dalton bill, Perper went to work. He agreed to amend his bill to the compromise figure of 2 cents a gallon. And he agreed to stick to that compromise by promising to ask that the bill be sent back to committee if it were amended upward in either chamber. That commitment, which Dalton had refused to make on his proposal, was enough to win over three opponents and pass the bill out of committee.

Although victory was still uncertain, for the moment Martin Perper was basking in the limelight. A wire service photo of him grinning gleefully in committee after the vote made most of the state's major newspapers, as did his acidic comment to Finance Chairman Archibald A. Campbell -- a gasoline-tax opponent -- "This one was sleeping on you, Mr. Chairman."

"I was very happy to see the bill get through," Perper says in something of an understatement. Although he appears to enjoy being the center of all this attention, Perper contends, "It's no fun at all trying to steer that bill through committee and the House.'

Perper, 40, a dogged and supremely self-confident politican, is certainly no stranger to controversy.

He first came on Virginia political scene in 1976, when he defied the wishes of Republican Party elders and ran for the U.S. Senate as a self-proclaimed Republican independent, challenging Sen. Harry F. Byrd Jr., a conservative independent and Democrat Elmo Zumwalt.

The Republican leadership had planned to back Byrd, but Perper had other ideas. When the GOP refused to nominate him, he ran anyway and received 4.5 percent of the vote.

An independently wealthy businessman who owns a McLean management consultant company and several Holiday Inns, Perper ran better in his House of Delegates race the next year, winning one of the five seats in the sprawling 18th District, which covers northern Fairfax County, Fairfax City and Falls Church.

In Richmond, Perper has carried on his reputation as an outspoken maverick who wins points for being hardworking and conscientious. But he is also accused of being egocentric and abrasive, and his critics point to his occasionally blustering performance on the Finance Committee last year.

Said one lobbyist, "Martin almost snatched defeat from the jaws of victory."

Perper is quick to admit some flaws. "I make mistakes just like everybody here, and hopefully, I learn something every day."

But he says he became angry when some committee members criticized Dalton: "I was not going to just sit back and let my governor take a bunch of heat that's undeserved."

As for his own political future, many observers expect Perper to join the field of Republican challengers to incumbent Rep. Joseph L. Fisher, a Democrat who represents the 10th Congressional District. For now, Perper will say only, "I'm giving it consideration."