WASHINGTON — Law enforcement officials are in the final stages of sealing off a heavily fortified security zone encompassing the Capitol and the historic National Mall here as they prepare for the inauguration Friday and the substantial protests it is expected to attract.

In addition to the usual range of threats, officials from federal, state and local agencies are preparing this year for what they say could be large-scale protests aimed at disrupting the ceremony and registering disapproval of Donald Trump’s presidency at the moment the world is watching his ascension to office. A march planned for Saturday could attract as many as half a million people, one official said, putting additional stress on law enforcement.

The nexus of those threats are making this week’s festivities the most difficult security challenge since the inauguration of President Barack Obama in 2009, which drew a record crowd estimated at 1.8 million to the city and prompted at least one eventually discredited foreign threat, officials said.

“We’ve got to be vigilant, we’ve got to plan, we’ve got to prepare,” Jeh Johnson, the secretary of homeland security, told reporters during a briefing last week.

Intelligence agencies said they knew of no credible threat to the inauguration or surrounding events, but that had not stopped the security teams from deploying at full capacity.

During a preinaugural dinner in Washington on Tuesday, Mr. Trump predicted his swearing in ceremony would draw a “record” crowd and praised a group of motorcycle riders he said would protect his celebration from protesters.

Government officials say they see no evidence to support that claim. Instead, they are planning for a crowd of 700,000 to 900,000 people, though officials cautioned that the number could swing up or down depending on the weather.

A crowd within that range would be typical for the swearing-in of a new president. A relatively small crowd, estimated at 300,000 people, turned out for George W. Bush’s 2001 inauguration.

Mr. Trump is seen as clearly caring about posting a big number.

In a video ad posted on social media Wednesday, he said: “Hopefully we’re going to get a million people. We’re going to really make a big statement.”

But this time, reflecting the nation’s deep and persistent political divisions, those spectators attending the inauguration are expected to be joined in Washington by thousands of others who are planning demonstrations for and against Mr. Trump. Mr. Johnson said law enforcement officials had tallied 99 groups planning actions for the inaugural period, including 63 on Friday alone.

Washington and National Park Service police have sought to separate the demonstrating groups from one another and from the main inaugural events, wherever possible.

The largest demonstration should come Saturday, when hundreds of thousands of people are expected to participate in the Women’s March on Washington, even as requests by women who oppose abortion to be officially included in the march are being spurned.

Christopher Geldart, the director of homeland security for the District of Columbia, said his team was preparing for 400,000 to 500,000 people at the march and expected that smaller protest actions could crop up elsewhere in the city Saturday, as well.

Those numbers are quite likely to be larger than any seen at an inauguration since at least the Vietnam War era. Mr. Bush’s 2001 inauguration attracted modest protest action, the largest in more recent memory, but it was largely disorganized and caused no significant disruptions. Opposition to the Iraq war drew protesters once again in 2005. Very few demonstrators greeted Mr. Obama in 2009 or in 2013.

For security officials, the presence of protesters — and potential clashes between groups for and against Mr. Trump — will add a layer of concern to the complex plan to safeguard the nation’s transfer of power that has been under development for much of the last year and will most likely cost more than $100 million.

Intelligence agencies are carefully scanning for a wide range of new and established potential threats, from cyberattacks to homegrown violent extremism to foreign plots.

Operating from a unified command post, a patchwork of several dozen agencies will command a team of roughly 28,000 security personnel monitoring the capital region from the streets, the air and the two rivers that border the city.

Those forces, which are roughly on par with those 2009, are to include some 7,800 National Guard members, 5,000 police officers from Washington and departments across the country, as well as 10,000 representatives from the Department of Homeland Security, including the United States Coast Guard, Secret Service and Transportation Security Administration.

Mr. Johnson said inaugural planners have been particularly attentive to the threats of self-radicalized, so-called lone wolf terrorists this time, given the evolution of the global terrorism threat in the last four years.

Authorities will begin enforcing a series of “soft” and “hard” perimeters around much of downtown Washington in the early hours of Friday morning. Dump trucks, cement trucks and other heavy objects will be used to erect a barricade along the innermost perimeter to prevent against the possibility of an attack by a large vehicle driven into the crowd, like recent terrorist incidents in Nice, France, and in Berlin.

Five of Washington’s largest hospitals — Sibley Memorial, Howard University, George Washington University, MedStar Washington Hospital Center, and Children’s National Medical Center — have been put on alert in case of potential casualties. Medical staffs at each have been asked not to schedule elective surgeries Friday to keep as many beds open as possible.

The city’s subway system, which has been hobbled by a yearlong maintenance plan, will be operating at full capacity Friday, when officials expect large crowds to choke the system as they travel in and out of central Washington. Aside from a handful of station closures near the Mall, at the convention center and outside the Pentagon, all lines will be running at near rush-hour service levels from 4 a.m. into the evening Friday. Additional trains will be added Saturday to accommodate marchers.

Roads surrounding the Capitol, the White House, the Mall and sites hosting other inaugural events will progressively be closed beginning early today.

Law enforcement officials said they were preparing for demonstrators to try to test some of those barriers, including the ones along Pennsylvania Avenue, on which the presidential motorcade will travel to the Capitol and the inaugural parade will process.

One of the main umbrella groups planning demonstrations, #DisruptJ20, has seen its numbers swell in recent days as people from all over the country began arriving in Washington. Organizers for the group said Wednesday that they have planned a series of permitted rallies and other unpermitted “actions” for the coming days.

The most disruptive may well be a series of early morning blockades planned for security checkpoints along the inaugural perimeter, through which all those attending the ceremony will have to pass.

“We intend basically to set the tone of resistance here for the coming years,” said Lacy MacAuley, a spokeswoman for the group.

Mr. Johnson said authorities were aware of those plans and others, and that “special precautions” would be taken to ensure the inauguration could not be disrupted.

The women’s march Saturday, which will begin with a rally at the base of Capitol Hill, is expected to be less disruptive. Organizers have been working closely with law enforcement, and with the inaugural festivities already over by the time the march begins, Mr. Geldart said the day would present a much simpler security challenge.

“We’re basically not going to stand anything down after the inauguration,” Mr. Geldart had said. “We’re leaving that stuff in place.”

In other news, Mr. Trump on Tuesday night paid out $25 million in compliance with the settlement reached in three Trump University lawsuits; he had until Wednesday to deposit the funds under the terms of the settlement.

Mr. Trump also announced his inaugural Bibles: one his mother gifted him in 1955 when he graduated from Presbyterian Sunday school and the one President Abraham Lincoln used at his inauguration.

Associated Press, The Washington Post and The San Diego Union-Tribune contributed.