Massachusetts congressional candidate Ayanna Pressley sent one of her campaign aides to New York last week to help get out the vote for Alexandria Ocasio-Cortez, who stunned national Democrats Tuesday by toppling veteran Rep. Joseph Crowley.

Now Pressley is hoping to become the next giant-slayer in this year’s midterms. The first black woman to serve on the Boston City Council, Pressley, 44, is challenging Rep. Michael Capuano, 66, a 10-term incumbent in Massachusetts’ 7th District.

In the same way that Ocasio-Cortez defied the odds to defeat Crowley, a 10-term veteran who also is the fourth-ranking Democrat in the House, Pressley is looking to prove political handicappers wrong by defeating Capuano in the Sept. 4 primary.

Pressley congratulated Ocasio-Cortez Tuesday night in a tweet featuring a picture of the two insurgent candidates.

Ocasio-Cortez responded by urging support for Pressley.

In a statement Wednesday, Pressley said that Ocasio-Cortez’s campaign has been “dynamic and inspiring, and it’s about more than one election — it’s about building a movement of people standing up and demanding to be heard.”

She also said that “[t]he job description for Representatives in Congress has changed. In deep blue districts like New York’s 14th and the Massachusetts 7th, voters are asking for more than a reliable vote — they are asking for committed, activist leadership.”

Pressley has struggled to make the case for why voters should replace Capuano with her, as both have similar positions on economic and social issues and have been vocal critics of the Trump administration’s policies. Earlier this week, Pressley called for defunding the federal Immigration and Customs Enforcement, which she said “is creating an atmosphere of toxic fear and mistrust in immigrant communities.” Last weekend Capuano was part of a delegation of Democratic lawmakers who toured a detention center at the U.S.-Mexico border.

Alexandria Ocasio-Cortez became the youngest woman elected to Congress Nov. 6, after ousting 10-term incumbent Rep. Joseph Crowley (D-N.Y.) in the primaries. (Amber Ferguson/The Washington Post)

After Ocasio-Cortez’s surprise victory, social media was abuzz about Pressley’s race, which also hasn’t gotten much attention beyond the fact that she is part of a surge of young Democratic women candidates running for Congress this year, fueled by the #MeToo movement and disapproval with President Trump.

Both also are women of color who are challenging older white men representing districts that are majority minority. Both women have suggested that they have the life experiences and sensibilities to better serve the residents of those communities. Ocasio-Cortez, a 28-year-old Latina, was a bartender before launching her congressional campaign. Pressley was raised by a single mother and has said she was raped when she was in college.

Massachusetts’ 7th District, which includes most of Boston and portions Cambridge and Milton, as well as Chelsea and Somerville, is close to 60 percent minority. If Pressley were to win the primary and the general election, she would be the first African American woman to represent the Bay State in Congress.

Yet the historic nature of Pressley’s candidacy has not been a rallying point for black political leaders. Deval Patrick, who was elected Massachusetts governor in 2006 — and became the nation’s second elected African American governor — has endorsed Capuano. Patrick praised Pressley, though not by name, in a statement but said that Capuano “believed in me when few others would take a chance on a novice candidate.” He added that “Mike was with me in the trenches.”

The Congressional Black Caucus political action committee also is supporting the incumbent. “Civil rights are under attack, and we need to fight back. Rep. Capuano has built his career on standing up for those who have been left behind,” Rep. Gregory Meeks (D-N.Y.), chairman of the PAC said in a statement.

Capuano is considered a reliable liberal, which is why most major groups on the left are sticking with him. The state’s two Democratic senators — Elizabeth Warren and Ed Markey — have so far remained neutral in the race.

He has more than $1.1 million cash on hand, according to the most recent campaign filing, while Pressley reported $259,633 on hand.

Pressley has been endorsed by some local political leaders and grass-roots organizations. But EMILY’s List, which tapped Pressley for its Rising Star Award in 2015 is not backing her.

Higher Heights for America, which encourages black women to run for elected office, is helping to rally support for Pressley among African American women around the country.

Glynda C. Carr, co-founder of the group, said Tuesday’s upset in New York “demonstrated that all seats are truly in play and that voters are looking for candidates that are ready to lead in this moment.”

Kelly Dittmar, a political science professor at Rutgers University and scholar at the Center for American Women and Politics, Rutgers’ Eagleton Institute of Politics, said it’s difficult to say what Ocasio-Cortez’s victory means for Pressley.

But one immediate benefit is more media attention as activists and pundits ponder whether the similar profiles of the contests could mean another upset. “It will be interesting to track whether that yields more fundraising and support in other ways,” Dittmar said.