WASHINGTON — Johns Hopkins University is buying the landmark Pennsylvania Avenue building that houses the Newseum in a $372.5 million deal announced Friday that will enable the struggling cultural institution devoted to news and the First Amendment to seek a new home in the D.C. area.

The Freedom Forum — the private foundation that created the Newseum and is its primary funder — said the museum will remain open at 555 Pennsylvania Ave. NW for the rest of the year. Then, assuming the deal wins regulatory approval, the university will take control of the property and prepare to move several graduate programs to a prime address in Washington.

The Newseum has operated since 2008 at the Penn Quarter location, near the National Mall and a few blocks northwest of the Capitol, drawing hundreds of thousands of visitors a year but enduring financial challenges as it charged an admission fee while neighboring Smithsonian museums were free. The Freedom Forum announced in August 2017 that it was studying options for the building, including a sale, to escape what had become an untenable run of perennial budget deficits at the Newseum.

"This was a difficult decision, but it was the responsible one," Jan Neuharth, chair and chief executive of the Freedom Forum, said in a statement. "We remain committed to continuing our programs — in a financially sustainable way — to champion the five freedoms of the First Amendment and to increase public awareness about the importance of a free and fair press. With today's announcement, we can begin to explore all options to find a new home in the Washington D.C. area."

For Johns Hopkins, a prominent research university based in Baltimore, the purchase will raise its profile in the nation's capital. The university's School of Advanced International Studies, which for decades has been on Massachusetts Avenue NW, will move to the Pennsylvania Avenue building after it is remodeled. So will other D.C.-based graduate programs in business, nursing, and arts and sciences. Hopkins said it has about 3,300 faculty, students and staff in the city, in addition to faculty at Johns Hopkins Sibley Memorial Hospital in Northwest Washington.

"Acquiring this iconic property in the heart of the nation's capital will represent a transformative moment for Johns Hopkins University and place our research and expertise in the midst of national and global decision-making," the university said in a statement. Johns Hopkins said it planned to turn the building into "a world-class academic space that can be optimized for current and future research, education and engagement."

Hopkins said money for the purchase will come from selling its Massachusetts Avenue properties as well as university funds and a gift from billionaire Michael Bloomberg. The size of the former New York mayor's donation was not disclosed. A graduate of Johns Hopkins, Bloomberg recently gave his alma mater a record $1.8 billion to support student financial aid and has previously given it hundreds of millions of dollars for other purposes.

Johns Hopkins officials said they plan to work with city and federal agencies to obtain necessary approvals. The property includes space occupied by the museum as well as residences on the site. Remodeling would begin in fall 2020, Johns Hopkins officials said, with a goal of establishing more than 400,000 square feet of floor space for academic use. That is significantly more than what the university has in total in three buildings it owns and one location it rents on Massachusetts Avenue.

The university has been looking to upgrade its Washington facilities. Now, it will have a marquee address on the avenue that links the White House and the Capitol.

"It goes well beyond the symbolism of close proximity to critical corridors of public power," Johns Hopkins President Ronald J. Daniels said in a telephone interview. "It's a moment in which we are signaling our very firm determination to have greater impact on public policy formulation within Washington."

The site will be primarily a graduate center, he said, but will also open up opportunities for the university's undergraduates in Baltimore to explore Washington through research and internships. And it will provide a forum for events involving lawmakers, federal officials and policymakers. "These kinds of activities can be dramatically augmented with the spaces we're hoping to create for students and faculty," Daniels said.

The Freedom Forum, which owns 555 Pennsylvania Ave. NW, was established in 1991 by Al Neuharth, the founder of USA Today. Neuharth, who died in 2013, was the prime force behind the creation of the Newseum and its move to the splashy steel-and-glass building with a facade that displays a monumental inscription of the text of the First Amendment. Jan Neuharth, leader of the Freedom Forum, is his daughter.

The pending sale of the building signals the start of a new chapter for the Newseum, which opened in Washington in 2008 after an earlier incarnation in Northern Virginia. The Newseum said there will be no disruption to exhibitions this year for as long as it stays open.

"All of the artifacts on display in the museum will remain on exhibit for our visitors to learn from while the details of the agreement are settled," Carrie Christoffersen, curator and executive director of the Newseum, said in a statement. "Our collection preserves journalism and news history, and we will continue to be responsible stewards of our permanent collection of historic artifacts and newspapers."

Newseum visitor Jeremy Grandstaff tries out one of the tactile photo displays at the Newseum that enable blind people to connect with the Vietnam War photographs of John Olson, whose Tet Offensive photos taken as a Stars and Stripes photographer are on display through mid-March, 2019.JOE GROMELSKI/STARS AND STRIPES