State Treasurer Deborah Goldberg is seriously considering a run for Congress should incumbent U.S. Rep. Joseph Kennedy III decide to challenge U.S. Sen. Edward Markey in 2020, and is in the "decision-making process" as she talks with family, friends and long-time political supporters, two people close to the treasurer said Monday.

Goldberg filed a statement of candidacy with the Federal Election Commission to create the "Deb Goldberg for Congress Committee" on Monday as a placeholder for a future run should Kennedy decide to give up his House seat to run for the Senate.

Advisers to Goldberg said the Brookline Democrat would not run against Kennedy if he decided to seek re-election to the House. Her current term as treasurer runs through 2022.

"As we have all heard, there is wide speculation about a potential open seat in the Massachusetts 4th Congressional District. Treasurer Goldberg is in a decision-making process on whether to run and speaking to friends, family and advisers. She is taking the necessary steps to set up a campaign committee and account should that race become a reality," said Samantha Dallaire, a spokeswoman for Goldberg.

The 4th District seat has been held by Kennedy since the 2012 election, two years before Goldberg would run and win her first four-year term as treasurer. Kennedy won the seat after the retirement of longtime Congressman Barney Frank, who told Politico over the weekend that he was disappointed that Kennedy would consider challenging Markey.

Though Goldberg is not the first Democrat to express an interest in running for the U.S. House seat held by Kennedy, she has probably the highest profile as a twice-elected statewide official. An open race for Kennedy's seat, however, would be sure to draw many interested Democrats, and one — Ihssane Leckey — has already filed to run as a progressive Democrat and immigrant who lives in Brookline.

Since August, Kennedy has said he is considering running against Markey, who already has at least two declared opponents from within his own party — Shannon Liss-Riordan and Steve Pemberton.

Kennedy on Saturday held a meet-and-greet with Democrats after the Democratic Party Convention in Springfield to solicit feedback on a possible Senate run, and aides have said he is expected to make a decision within the next couple of weeks.

One adviser to Goldberg said her filing with the FEC on Monday was about getting ready just in case Kennedy should take the plunge, and put the odds on her running for Congress if the seat is open at "50-50."

According to the Massachusetts Constitution, no constitutional officer, like the treasurer, "shall continue to hold his said office after being elected a member of Congress of the United States, and accepting that trust." It also states that "the acceptance of such trust by any of the officers aforesaid shall be deemed and taken to be a resignation of his said office."

If there is a vacancy in the office of treasurer and receiver-general during an annual or special session of the Legislature, the Constitution calls for the office to be filled for the remainder of the term by a vote of the House and Senate in a joint session. If the vacancy occurs when the Legislature is not in session, the position would be filled by the governor, with the consent of the Governor's Council.

Goldberg followed former Democratic National Committee Chairman Steve Grossman into the treasurer's office in 2015 after emerging from a Democratic field that included state Sen. Barry Finegold and Thomas Conroy, who was a state representative at the time.

Last year, she won a second term after running uncontested in the Democratic primary and besting former state Rep. and Republican National Committeewoman Keiko Orrall 68% to 29%.

Goldberg, whose family used to own the Stop & Shop supermarket chain, is a philanthropist and former Brookline selectwoman who once also ran unsuccessfully in the Democratic primary for lieutenant governor in 2006.

The 4th Congressional District stretches from the western suburbs of Boston, including Newton, Brookline and Wellesley, through parts of Norfolk and Bristol Counties, including a portion of Fall River.