Federal officials announced a tentative agreement late Wednesday between Union Pacific, a rail company, and workers represented by unions.
Caltrain officials had announced Tuesday that a strike on Friday would mean suspending service between Gilroy and San Jose because Union Pacific owns the tracks used by this line.
Union Pacific announced that the tentative agreement provides wage increases and prevents a potential work stoppage.
Union members will vote on the tentative agreement, a process that includes a pact not to strike while votes are counted.