Gov. James S. Gilmore III chose political pragmatism over party discipline today, welcoming state Sen. Warren E. Barry's decision to stick with the Republican Party even though Barry remained unrepentant about making a campaign contribution to his son, a Democrat.

Gilmore stood quietly by the Fairfax County senator's side this morning at a Capitol news conference, smiling and blinking as Barry announced he would not bolt the party as long as Republicans did not renew a threat to remove him from his Senate committee chairmanship. When it came time for him to talk, Gilmore denied ever being angry over the senator's decision to give $75,000 from his campaign fund to his son, Stanley G. Barry, the successful Democratic candidate for Fairfax sheriff.

The governor, known for the premium he places on party loyalty, expressed empathy for a father wanting to help his son.

"I look forward to working with him and the other Republicans in the Senate," Gilmore said of Barry.

The governor's conduct won high marks from Republicans. With Republican victories in last week's legislative elections, the party took control of both chambers of the General Assembly for the first time since Reconstruction. Faced with the risk of letting the state Senate, split 21 to 19, slide back to parity if Barry left the GOP, Gilmore buried the hatchet.

"Warren won," said state Sen. Richard L. Saslaw (D-Fairfax). "Barry one, Gilmore zero."

But other lawmakers said it reminded them of the difference between Gilmore and his predecessor, Republican George Allen, who was not known for holding his tongue.

"One thing about Gilmore, as opposed to Allen, is he's very pragmatic," said Del. Vincent F. Callahan Jr. (R-Fairfax). "The art of the possible is what politics is. He's not going out of his way to alienate anyone."

The situation with Barry had been festering for more than a week. Several Republicans were sharply critical of his decision to help his son, who last week beat Fairfax Sheriff Carl R. Peed, a Republican and Gilmore ally. They suggested that Warren Barry, a GOP lawmaker since his election in 1969, should lose his chairmanship of the Senate Transportation Committee.

Barry fumed over the reports and placed a round of calls to both Democrats and Republicans in the state Senate. He arranged a meeting with Gilmore and the news conference to follow, but he warned as recently as Monday that he might leave the party, saying of Gilmore, "I want him to get off my back."

He was no more conciliatory today. "I have no plans nor desire to leave the Republican Party," he said, "but I want to qualify that by saying, should this Republican hierarchy somehow show up and penalize [me] by stripping me of the chairmanship, I certainly would open the door again."

Gilmore let such comments pass, showing the practical side that has been as much a feature of his administration as the urge for party loyalty.

This year, Gilmore displayed his concern for party discipline when he backed a conservative challenger against a moderate Republican delegate who sometimes sides with House Democrats.

But he also demonstrated flexibility in pursuit of a Republican majority in the legislature. Gilmore, who generally opposes big spending programs, found that Democratic legislative candidates were gaining some ground by criticizing his refusal to back heavy spending on transportation programs. He proposed a transportation package even bigger than that offered by the Democrats, largely silencing them on the issue.

"Gilmore is a pragmatist first and foremost. He is not a hard-line ideologue," said Mark J. Rozell, a political science professor at Catholic University. "In his gut, he may be angry about what Warren Barry did and want to punish him for what he did. But he knows the price is much too high."

"He's very goal oriented," said GOP strategist Dick Leggitt, a Gilmore adviser. "The governor's not going to let lesser disagreements dissuade him from the big picture."

Republican lawmakers said that approach will serve Gilmore well in his dealings with the General Assembly.

"Attempting to control Republican legislators is like herding kittens. It can't be done," said state Sen. William C. Mims (R-Loudoun). "It will be a challenge to lead this majority. Today's news conference is an example."

But Del. John A. "Jack" Rollison III (R-Prince William) said that Gilmore still faces a learning curve in dealing with a Republican General Assembly.

"What he will find out, and what other governors find out, is that the legislature is a coequal branch of government," Rollison said. "Before, we were junior partners. Now, we will be coequal partners."

CAPTION: Gov. James S. Gilmore III (R), left, watches Sen. Warren E. Barry announce his intention to remain a Republican.

CAPTION: Stanley G. Barry (D), right, was elected Fairfax County sheriff with help from his father, state Sen. Warren E. Barry (R).