Media playback is unsupported on your device Media caption US astronaut Anne McClain inside the Dragon capsule

America's new astronaut capsule has successfully docked with the International Space Station (ISS) as part of its demonstration mission.

The Dragon vehicle, launched by California's SpaceX company on Saturday, made the attachment autonomously.

It is the latest in a series of tests the capsule must pass in order to get approval from Nasa to transport people.

All this particular mission is carrying is a test dummy and 180kg of supplies.

But if everything goes according to plan, astronauts could be launching in the Dragon as early as July.

The capsule's "soft capture" contact with the ISS occurred at 10:51 GMT, when the station was flying over ocean just north of New Zealand. A full and secure docking was confirmed about 10 minutes later.

Media playback is unsupported on your device Media caption Watch the Dragon capsule launch to orbit atop a Falcon rocket

The Dragon approached the 400km-high (250 miles) station from the front and used its computers and sensors to guide itself in.

Astronauts aboard the ISS watched closely on HD cameras to make sure the capsule performed as planned.

The capsule advanced on the station slowly, stepping through a series of planned waypoints.

US astronaut Anne McClain and Canadian astronaut David Saint-Jacques oversaw events from the station's big bay window, or Cupola. They had the facility to command the Dragon to hold, retreat and even abort the docking.

After some rehearsals, the "go" was given for the final approach.

Image copyright NASA Image caption The Dragon capsule lifted its nose cone to make the docking

Attachment was made to a new type of mating adaptor on the ISS's Harmony module.

This has a spring system which initially dampens the movement of the incoming vehicle, before applying a series of hooks to pull it in and make an air-tight seal - so-called "hard capture".

McClain, Saint-Jacques and ISS commander Oleg Kononenko were able to enter the Dragon a couple of hours later, after the air pressures inside the capsule and the station had been equalised.

Watching on the ground was Bob Behnken, who's been picked, along with Doug Hurley, to make the first crewed ride in the Dragon when it gets its certification.

"It was super exciting to see it," he said. "I know you heard the applause and all the clapping that went along with the accomplishment today and so it's just one more milestone that gets us ready for our flight coming up here."

The docking procedure is a step up for SpaceX because the cargo ships it normally sends to the lab have to be grappled by a robotic arm and pulled into a berthing position. The freighters do not have the sophistication to dock themselves.

The Dragon capsule is due to stay at the ISS until Friday when it will detach and begin the journey back to Earth.

This is the phase of the mission that SpaceX founder Elon Musk says worries him the most – the fiery, high-speed descent through the atmosphere.

The Dragon's backshell, or conical upper-section, has a somewhat irregular shape and that could lead to a roll instability at hypersonic speeds.

"It should be fine, but that'll be a thing to make sure it works on re-entry," said Mr Musk.

"Everything we know so far is looking positive. Unless something goes wrong I should think we'll be flying (people) this year; this summer, hopefully."

Image copyright Getty Images/NASA Image caption Elon Musk with astronauts Doug Hurley and Bob Behnken who will make the first crewed flight

The American space agency wants to contract out crew transport to SpaceX.

Whereas in the past, Nasa engineers would have top-down control of all aspects of vehicle design and the agency would own and operate the hardware - the relationship with industry has been put on a completely new footing.

Today, Nasa sets broad requirements and industry is given plenty of latitude in how it meets those demands.

Agency officials still check off every step, but the approach is regarded as more efficient.

Image copyright NASA Image caption Two docking views: What Dragon saw on approach (L) and what the ISS saw (R)

Nasa chief Jim Bridenstine said it was a new era where "we are looking forward to being one customer, as an agency and as a country.

"We're looking forward to being one customer of many customers in a robust commercial market place in low-Earth orbit, so we can drive down costs and increase access in ways that historically have not been possible."

Nasa is also working with Boeing on crew transport. The company has developed a capsule of its own called the Starliner. This will have its equivalent demo flight in the next couple of months.

Jonathan.Amos-INTERNET@bbc.co.uk and follow me on Twitter: @BBCAmos