Dozens of state, local and congressional candidates filed papers just ahead of Tuesday evening’s deadline to run in the June 24 Maryland primary, including one who added a surprise twist to the race for a Montgomery County Council seat.

There were no eleventh-hour surprises in the major statewide races. Lt. Gov. Anthony G. Brown, Attorney General Douglas F. Gansler and Del. Heather R. Mizeur (Montgomery) are competing for the Democratic gubernatorial nomination. Republican hopefuls include Del. Ronald A. George (Anne Arundel); Larry Hogan, a cabinet member under former governor Robert Ehrlich; and Charles County businessman Charles Lollar.

George on Tuesday became the last of the major candidates for governor to name a running mate — a prerequisite for filing for office. He selected former Frederick alderman Shelley Aloi. George also registered his intent to participate in the state’s public financing system, joining Mizeur and Hogan in opting into the system, which caps overall primary spending at about $2.5 million in exchange for the opportunity to receive public matching funds.

In the attorney general’s race, Del. C. William Frick (D-Montgomery), one of four Democratic candidates, withdrew around 8 p.m. and filed for re-election instead in District 16.

That left Del. Jon S. Cardin (D-Baltimore County), Del. Aisha N. Braveboy (D-Prince George’s) and Sen. Brian E. Frosh (D-Montgomery) seeking the Democratic nomination to succeed Gansler.

One surprise Tuesday night was the filing for her old office by former Del. Tiffany Alston (D-Prince George’s), who was removed from her seat in 2012 in connection with a theft case. Alston arrived at the State Board of Elections at 8:40 p.m., 20 minutes before the deadline.

She said “a lot of unfinished business” remains in her district and that many of her constituents have urged her to run again. Alston said the convictions in her case have been stricken. She was initially charged with stealing $800 from the General Assembly to pay an employee of her law firm.

In Montgomery, the two men who have held the county executive’s office for the past 20 years — two-term incumbent Isiah Leggett and Doug Duncan, his three-term predecessor — will compete for the Democratic nomination along with County Council member Phil Andrews (D-Rockville-Gaithersburg). Jim Shalleck, a Montgomery Village attorney and former New York prosecutor, is unopposed for the Republican nomination.

Prince George’s County Executive Rushern L. Baker III (D) remained unopposed in his primary campaign for a second term.

Another unexpected development Tuesday was the return to the campaign trail of former Montgomery Council member Duchy Trachtenberg, who filed as a candidate in District 1 against incumbent Roger Berliner (D-Potomac-Bethesda), who had been unopposed.

Trachtenberg held an at-large seat on the council from 2006 to 2010 before losing to Hans Riemer in the Democratic primary. Public employee unions targeted her for defeat because of her opposition to pay increases she regarded as unsustainable.

The District 1 contest could be a grudge match of sorts. After allying with Trachtenberg on many issues, Berliner endorsed Riemer in the 2010 primary, a move that political insiders say Trachtenberg regarded as a personal betrayal.

Other Montgomery council incumbents also face challengers. In the District 2 Democratic primary, incumbent Craig Rice (D-Upcounty) is opposed by Bethesda attorney Neda Bolourian and Gaithersburg businessman Chris Fiotes Jr. Germantown businessman Dick Jurgena is running unopposed for the GOP nomination.

The Democratic primary for Andrews’s District 3 seat, open for the first time in 16 years, features Gaithersburg Mayor Sidney A. Katz, Gaithersburg Council member Ryan Spiegel and Rockville Council member Tom Moore. Eastern Montgomery’s District 5 looks to be the most crowded field, with Montgomery school board member Christopher S. Barclay; Silver Spring activist Evan Glass; nonprofit leader Jeffrey Thames and Takoma Park activist Terrill North. Del. Tom Hucker (D-Montgomery) was not listed on the Maryland Board of Elections candidates’ site as of 5 p.m., but he said he was filing his papers Tuesday afternoon.

Two Democrats are challenging the council’s four at-large members (the top four vote-getters win). Upcounty resident and Telemundo executive Beth Daly and Vivian Malloy, a retired Army nurse and county Democratic central committee member from Olney, will try to unseat two of the four incumbents: George L. Leventhal, Hans Riemer, Nancy Floreen and Marc Elrich. Also in contention are two Republicans: Bethesda blogger Robert Dyer and Darnestown attorney Shelly Skolnick.

District 4 Council member Nancy Navarro (D-Mid-County) is running unopposed for renomination.

In Prince George’s County, term limits prevent three council incumbents from running again. One of them, William A. Campos (D-Hyattsville), is a candidate for state delegate in the newly created Legislative District 47B, the first Hispanic-majority district in Maryland.

Of the six incumbents running for a second term, two have Democratic primary challengers. District 6 incumbent Derrick Leon Davis (D-Mitchellville) will face Pierre Richard Augustin, president of a D.C. patrol and security service, and Gerron S. Levi, who served in the House of Delegates from 2007 to 2011. In District 7, incumbent Karen Toles (D-Suitland) has three opponents.

The three open council seats each drew two Democratic primary candidates. In District 2, Maryland Del. Doyle L. Niemann will vie with community activist Deni Taveras to replace Campos. In the District 4 race to replace Ingrid M. Turner (D-Bowie), Bowie City Council member Todd M. Turner will run against Vince Canales, former president of the Fraternal Order of Prince George’s County Police. In the District 3 contest to succeed Eric Olson (D-College Park), the field includes Dannielle Glaros, Olson’s chief of staff, and Jim Wildoner, who failed to beat Olson in 2006.