NEW YORK — An unmanned Russian cargo ship that missed its first chance to dock at the international space station July 2 tried again two days later — this time successfully linking up with the orbiting lab.

The Progress 38 cargo ship docked flawlessly July 4 at 12:17 p.m. EDT while flying without the safety net of a remote control system that allows cosmonauts inside the space station to take command of incoming supply ships using a joystick should they veer off course.

The successful docking came two days after the Progress 38 cargo ship’s first failed docking attempt, in which the spacecraft sailed past the space station after aborting its delivery run.

“No doubt a sigh of relief on the part of the Russian control team,” NASA commentator Rob Navias said in a NASA TV broadcast after the docking.

The orbital rendezvous occurred 354 kilometers above Earth as both spacecraft flew over the point where the borders of China, Kazakhstan, Mongolia and Russia meet. The Progress 38 supply ship launched June 30 and delivered 2.5 tons of new equipment, fresh food and other supplies for the space station’s six-person crew.

Russian engineers suspect it was interference between the Progress vehicle remote control system on the space station and a TV camera on the space freighter that forced the incoming spacecraft to abort its July 2 approach.

Instead of docking to an aft berth on the station’s Russian Zvezda module, the Progress 38 cargo ship flew by at a range of about 3 kilometers to a point about 300 kilometers in front of the space station until another attempt could be made.

For the July 4 docking, Russian flight controllers opted to forgo any use of the remote control system, called the Telerobotically Operated Rendezvous Unit (TORU). Instead, they checked and rechecked the Progress 38’s autonomous Kurs navigation system, as well as its backup system, to make sure the spacecraft was completely ready to dock itself at the space station.

“Everything was tested extensively yesterday, including the primary and backup systems,” Navias said.

Like Russia’s crew-carrying Soyuz spacecraft, the unmanned Progress freighters are designed to fly themselves to the space station using the Kurs navigation system. Soyuz spacecraft can be flown manually by cosmonauts from inside the vehicles, while Progress can be guided in using the TORU system.

Both spacecraft have a long record of reliability, though some have had to be guided in by cosmonauts. The last Progress to be docked under cosmonaut control arrived at the station May 1.

“It is a bit surprising,” former NASA astronaut Leroy Chiao, a former space station commander, said about the recent Progress malfunction. “These vehicles are very reliable, and the operations for getting them to stations are quite mature.”

The cargo ship’s arrival at the space station occurred on the Independence Day holiday in the United States.

As both a weekend and a U.S. holiday, the station crew had expected to have the day off, but worked through the Progress 38 ship’s arrival instead. Of the six people living on the space station, three are Americans and three are Russians.

One of the station’s American crew members, NASA astronaut Douglas Wheelock, sent Fourth of July greetings to Earth to mark Independence Day in space.

“In celebration of freedom and liberty…Happy 4th from the [space station’s] Russian Segment!” Wheelock wrote in a post on Twitter, where he is chronicling his mission under the name Astro_Wheels.

The station crew later opened the Progress 38 cargo ship to begin unloading supplies, NASA officials said.

Packed aboard the spacecraft were nearly 870 kilograms of propellant for the station, nearly 50 kilograms of oxygen, 99 kilograms of water and 1,209 kilograms of dry cargo — which includes spare parts, science equipment and other supplies.