Secretary of State Antony J. Blinken and Defense Secretary Lloyd J. Austin III met with reporters nearly 48 hours after leaving Washington on what was supposed to be a covert mission to discuss an operation that was nearly over before it began.

The visit also resulted in a significant shift in America’s definition of success in Ukraine.

The two cabinet secretaries spoke in a warehouse in front of tall stacks of humanitarian aid, with green-painted wooden boxes of munitions for Soviet-designed weapons used by Ukrainian troops across from them — stark visual reminders of the types of aid the US is providing Kyiv.

Mr. Blinken predicted that by the end of the day, everything would be inside Ukraine’s borders.

Mr. Blinken’s and Mr. Austin’s staffs were planning a trip to an Air Force base in Ramstein, Germany, on Tuesday to meet with officials from other countries to discuss how they could assist Ukraine in its fight against Russia. A small group of those same staff members worked in parallel on a need-to-know basis to plan a stop in Kyiv ahead of time so that the secretaries could personally inform Ukrainian President Volodymyr Zelensky that President Biden would quickly re-establish the US embassy in the Ukrainian capital and provide hundreds of millions of dollars in additional military aid. It would be the first unannounced visit by the highest-ranking American delegation since the Russian invasion began.

Participants who thought they’d be leaving for Germany on Monday were informed on Friday afternoon that their plans had changed.

Mr. Blinken and Mr. Austin boarded military C-17 transport planes at Joint Base Andrews in Maryland early Saturday morning, driving straight onto the tarmac and taking off with the mission’s secrecy intact.

Until about halfway through the nine-hour flight to Poland, the secret was kept.

Mr. Zelensky announced that Mr. Blinken and Mr. Austin would be arriving in Kyiv the next day during an apparently unscripted remark during a news conference in the Ukrainian capital on Saturday afternoon. Shortly after, a senior defense official emerged from Mr. Austin’s quarters in the C-17’s cargo hold and told the three reporters accompanying the defense secretary, somewhat sheepishly, that President Zelensky had blown the operation’s cover and the trip’s future was uncertain.

Officials at the Pentagon, on the other hand, had prepared for a variety of scenarios, one of which was the leak of information about the secret trip. As a result, the planes of the two cabinet members continued to fly.

Mr. Blinken and Mr. Austin climbed into cars and were driven across the border into Ukraine to begin an 11-hour train ride to Kyiv after arriving in Poland early Sunday morning. They were accompanied by only a few members of their staff, and their whereabouts were monitored by a US military tactical operations center in Poland minute by minute.

A senior State Department official and a senior defense official gave reporters in Poland a sneak peek at what Mr. Blinken and Mr. Austin would be offering Mr. Zelensky while the secretaries were on their way to Kyiv.

Officials said they didn’t know whether Marines would be stationed to guard the embassy in Kyiv once it reopened, but that Mr. Biden intends to name an ambassador to lead it as soon as possible.

According to a senior defense official, the first group of more than 50 Ukrainian artillery soldiers completed their training on US-supplied 155-millimeter howitzers on Sunday, which are slightly different in design from the Soviet-era 152-millimeter guns that have been used by Ukrainian forces since the country’s independence. According to the official, a second group of Ukrainian artillery specialists will begin a six-day training course soon.

After nearly nonstop travel for the previous two days, the cabinet secretaries arrived in Poland, near the Ukrainian border, on Monday morning.

Mr. Blinken and Mr. Austin met with soldiers from the 82nd Airborne Division shortly after briefing reporters, thanked them for their service, and then boarded Air Force cargo planes bound for Ramstein.