WASHINGTON — Sen. Kamala Harris traveled to Afghanistan over the weekend as part of a congressional delegation, her office said Tuesday.

Such congressional trips are often kept secret until the lawmakers have returned.

Harris went to Kabul, Mazar-e Sharif and Kandahar in Afghanistan. She received briefings and met with U.S. troops, diplomats and national security professionals, according to her office.

The California Democrat serves on the Senate Intelligence Committee and the Homeland Security and Governmental Affairs Committee. Two Republicans from the Intelligence Committee traveled with her, panel chairman Sen. Richard Burr of North Carolina and Sen. James Lankford of Oklahoma.

The timing of the trip is likely to invite speculation about Harris’ 2020 presidential ambitions. Harris is a former prosecutor and ex-California attorney general, and foreign policy is one area where she could be looking to bolster her credentials heading into a wide-open Democratic primary season.

Harris has said she will decide over the holidays whether to run.

The senator has previously visited U.S. forces in Iraq and has met with troops and service members’ spouses at California military bases.

In a statement, Harris said she was “honored” to meet troops in Afghanistan “who make daily sacrifices” for the U.S.

“I was grateful to receive on-the-ground briefings on the state of the region and discuss how best to keep our country and our allies safe from the threat posed by terrorism,” Harris said. “I remain eager to find a political solution to the ongoing conflict in Afghanistan so we can bring U.S. service members and national security professionals home.”

Tal Kopan is The San Francisco Chronicle’s Washington correspondent. Email: tal.kopan@sfchronicle.com Twitter: @talkopan