A rushed, week-long primary campaign in Arlington and McLean ended Sunday with the selection of McLean lawyer Richard “Rip” Sullivan as the Democratic nominee and David Foster, former president of the Virginia Board of Education and Arlington School Board chairman, as the Republican nominee for Virginia’s 48th House District.

The nominations, due in Richmond on Monday evening, set up a special election Aug. 19. The election became necessary after Del. Robert H. Brink (D-Arlington) resigned June 30 after 17 years in office to take a job with Gov. Terry McAuliffe’s administration.

It took five ballots to nominate Sullivan under the local Democratic Party’s instant runoff voting method, which chairman Kip Malinosky said helps “ensure majority rule.”

In that system, if the first choice of voters fails to win a majority, the candidate with the lowest vote total is eliminated, and the second-choice votes of those who picked the eliminated candidate are tabulated instead. The process continues until a majority winner is found.

Sullivan led the first four ballots, but it took until the fifth for him to get 1,111 votes and reach the majority. Paul Holland, an environmental consultant and communications director for the Arlington Democratic Party, came in second, with 523 votes. Next was Andrew Schneider, director of the College of William and Mary’s Washington Area Alumni Business Alliance, with 444 votes.

Voters and campaign workers at the Democratic caucus Sunday afternoon griped about House Speaker William J. Howell (R-Stafford), who set the election for mid-August, which forced the parties to scramble over the Independence Day weekend. Despite the short notice, more than 2,100 people voted in the caucus. They chose among seven candidates, who announced their interest in the seat last week.

“We’re sending a message to Richmond — you can make us work fast, but we’ll still win in August,” said Peter Fallon, a Democratic activist working outside the caucus at Yorktown High School in Arlington.

Del. K. Robert Krupicka Jr. (D-Alexandria) noted that his primary election two years ago attracted 2,431 votes after three full weeks of campaigning. “I had the August primary, but I would argue a three-day weekend is even harder,” he said Sunday night. “It’s a big turnout — it’s impressive.”

Jimmy Mills, who came to the Sunday afternoon caucus with his daughter Mary Ann Mills, called all of the Democrats “splendid candidates” after he chose Holland and David Boling. As Kevin Yam and his wife, Brittany, headed into the caucus with their 15-month-old daughter, Sophie, on his hip, they said they, too, liked Holland.

Leaving the polls with a friend, Jamie Usrey said that although there was little time to bone up on the choices, she was one of the 100 to 200 residents who attended Saturday’s candidate forum to learn their stances.

The strongly Democratic district, which winds north and west along the Potomac River from Reagan National Airport to the Chain Bridge and then into McLean, is split 69 to 31 percent between Arlington and Fairfax counties.

The other Democratic candidates in order of their finish were: Boling, vice president of the Maureen and Mike Mansfield Foundation; Atima Omara-Alwala, president of the Young Democrats of America; Yasmine Taeb, a lawyer who serves on the Arlington County Commission on the Status of Women; and Jackie Wilson, a military veteran and spouse who works at the U.S. Institute of Peace.

Until Sunday, no Republicans said in public that they were interested in their party’s nomination. That changed when Foster was endorsed by the local Republican Party.

Foster said in a statement that if elected, he will introduce legislation in the General Assembly to create a public referendum on Arlington’s Columbia Pike streetcar proposal, which he called “impractical and unaffordable.” He said, “Roads and Metro, schools and tax relief are far more important to Northern Virginians than a half-billion dollar trolley.”

An earlier version of this story inaccurately quoted David Foster’s reference to the proposed Arlington streetcar line. The story has been corrected.