House Republican leaders and pro-trade Democrats were working late Tuesday night to revive the stalled trade deal that failed in the House on Friday.

The talks centered on a complicated procedural plan to use a different legislative vehicle – a trade preferences bill with Africa that many House Democrats support – to pass the worker retraining program blocked by House Democrats on Friday.

Here’s how the latest plan would work: The Senate could amend a House-passed trade preferences bill that promotes trade with Africa by attaching the worker retraining program. The House would then vote on a stand-alone version of the fast-track legislation it already passed. Then,  the two chambers would switch bills. Back in the House, lawmakers would vote on the new worker retraining and preferences bill presumably approved by the Senate. The Senate would then vote on fast-track.

Got it?

There is no guarantee either group can get enough votes on either bill, let alone both bills but both sides were still working late into the evening to see what was possible.

House Majority Leader Kevin McCarthy (R-Calif.) told reporters that any deal would still require more House Democrats to come on board.

“Whatever happens you’d see it in [the House Rules Committee] first,” McCarthy said. “You’d have to do TPA by itself and that would have to go back to the Senate.”

The hope is that the popular House-passed Africa trade preferences bill could give some Democrats enough political cover to switch their votes. That bill includes language to remove cuts to Medicare as a way to pay for costs in the worker retraining bill. Many Democrats cited the Medicare cuts as a reason they refused to support the trade bills last week.

McCarthy said he was “pretty sure” enough Democrats would stick with Republicans to approve the trade authority bill.

Pro-trade Senate Democrats huddled for about an hour Tuesday night to discuss what options they could accept. The group included Sens. Tom Carper (D-Del.), Chris Coons (D-Del.), Dianne Feinstein, (D-Calif.), Patty Murray (D-Wash.), Bill Nelson (D-Fla.), Maria Cantwell (D-Wash.), and Sen. Ron Wyden, (D-Ore.), the top Democrat on the Senate Finance Committee, all of whom voted for the trade legislation when it passed the Senate in May. They were joined halfway through the meeting by pro-trade House Democrats, including Rep. Ron Kind (D-Wis.), Gregory Meeks (D-N.Y.), and Gerry Connolly (D-Va.).

Murray said nothing had been sent over from the House yet and Kind said the group will reconvene Wednesday morning to discuss the options further and that communication is ongoing with House Republicans.

One option Carper raised is for Senate Democrats and Republicans to sign on to a joint letter assuring clear passage for trade legislation to come up for a vote. Carper said he and Sens. Roy Blunt (R-Mo.) and Rob Portman (R-Ohio) successfully used that strategy to pave the way for a vote on Trade Adjustment Assistance, which contains the worker retraining program, when it passed in 2011.

“That gave Democrats confidence that we weren’t being set up,” he said. “It could work, it worked once and it might work again.”

Paul Kane contributed to this report.