President Obama is expected to visit Boston next week to give a political boost to Governor Deval Patrick, a close friend, who is entering the final weeks of a tight reelection race, the Patrick campaign said yesterday.

The visit is planned for Oct. 16. No location or schedule has been determined, but a fund-raising event is also likely, according to the campaign.

Patrick, who is seeking a second term, is locked in a close race with Republican Charles D. Baker, recent polls show. Independent Timothy P. Cahill, the state treasurer, and Green-Rainbow Party candidate Jill Stein are also running.

Patrick and Obama have campaigned together on several occasions: in 2006, when the governor first ran for office, and in 2008, when Obama was running for president.

Obama also visited the state on behalf of Attorney General Martha Coakley in January, in the final days of her failed bid to win the US Senate seat formerly held by the late Edward M. Kennedy. The winner in that election — Senator Scott Brown, who has since become a national political celebrity — held a rally over the weekend in Needham for Baker’s campaign, drawing several hundred supporters.

The candidates and state parties reported their September fund-raising figures yesterday, as required by campaign finance rules.

Patrick and his Democratic counterparts, who early in the gubernatorial campaign trailed the Republicans badly in fund-raising, continue to outpace them in the closing months of the election season.

Patrick, Lieutenant Governor Timothy P. Murray, and the state Democratic Party raised a total of $1.7 million for the month. Baker; his running mate, Senate minority leader Richard R. Tisei; and the state Republican Party raised $1 million. A Baker spokesman said the state party raised an additional $500,000 at an Oct. 1 fund-raiser featuring Senator John McCain, Republican of Arizona, which will be reflected in the next reporting period.

Cahill and his former running mate, Paul Loscocco, raised $141,000, aides said.

The candidates often seek to use fund-raising numbers as a sign of momentum. The money will help both sides stay on air with television ads in the final weeks of the campaign.

Noah Bierman can be reached at nbierman@globe.com.

© Copyright 2010 Globe Newspaper Company.