Gravity is the force that causes a star to form from a nebula. More specifically, the self-gravity of gas and dust within a dense region of a nebula pulls material inward until it collapses, heats up, and eventually ignites nuclear fusion. While gravity does all the heavy lifting, the process involves a tug-of-war with other forces that resist collapse, and it unfolds over millions of years.
How Gravity Starts the Collapse
A nebula, or molecular cloud, is an enormous region of gas and dust floating in space. The gas is roughly 90% hydrogen and 10% helium, with trace amounts of heavier elements like oxygen. Most of the time, this gas just sits there. The outward push of thermal pressure (the heat energy of gas particles bouncing around) keeps the cloud from collapsing under its own weight. For a star to begin forming, gravity has to win.
That happens when a pocket of gas becomes dense enough or massive enough that its gravitational pull overwhelms the internal pressure holding it up. Physicists describe this tipping point using something called the Jeans mass: the minimum amount of material a gas cloud needs before gravity overpowers thermal pressure and collapse becomes inevitable. For a typical molecular cloud with moderate density and low temperature, this threshold is roughly 30 to 50 times the mass of our Sun. Once a region crosses that line, gravity takes over and the cloud begins to fall inward.
The speed of this initial collapse depends on density. In a region with around 100 gas particles per cubic centimeter (still an incredibly thin gas by Earth standards), the theoretical minimum collapse time is about 3 million years. In practice, it takes several times longer because thermal pressure slows things down, especially in the early stages.
What Pushes Back Against Gravity
Gravity doesn’t work unopposed. Several forces resist the collapse, and the balance between them determines whether a star forms at all.
Thermal pressure is the most basic opponent. Gas particles move faster when they’re warmer, creating outward pressure. In a hot, thin cloud, this pressure can easily prevent collapse. Star-forming regions tend to be extremely cold, often just 10 to 20 degrees above absolute zero, which keeps thermal pressure low enough for gravity to dominate.
Magnetic fields thread through molecular clouds and act like a scaffolding that resists compression. As gas tries to collapse, it drags magnetic field lines with it, and the increasing magnetic pressure pushes back. In galaxy-scale simulations, magnetic pressure can become strong enough to drive gas outflows, particularly in dense galactic centers where star formation has already amplified the field. Turbulence and cosmic rays add additional outward pressure. Together, these non-thermal forces regulate how quickly and efficiently gas converts into stars.
The overall balance is often described by a number called the virial parameter, which compares a cloud’s kinetic energy to its gravitational energy. Observations show that most giant molecular clouds hover near a state of marginal gravitational binding, with their kinetic and gravitational energies roughly equal. They’re on the edge, neither freely collapsing nor fully stable. Small pushes can tip the balance.
What Triggers the Collapse
If molecular clouds are sitting near that gravitational tipping point, something often nudges them over the edge. Several external events can compress a region of gas enough to trigger collapse.
A supernova shockwave is one of the most studied triggers. When a massive star explodes, it sends a blast wave racing through the surrounding gas. This wave compresses nearby cloud material, increasing its density until it exceeds the threshold for gravitational collapse. Simulations of this process show that non-rotating clouds experience robust triggered collapse when hit by a shockwave. When the cloud is already rotating, the compression leads to the formation of a disk around the collapsing core, which then interacts with the incoming post-shock flow.
Other triggers include collisions between molecular clouds, the compression waves created by spiral arms in galaxies, and radiation pressure from nearby hot stars. None of these create the star directly. They simply squeeze the gas past the point where gravity can take over on its own.
Why Dust Matters More Than You’d Think
Dust grains make up a tiny fraction of a nebula’s mass, but they play a critical supporting role. When gas collapses, it heats up from compression. That rising temperature increases thermal pressure, which fights back against gravity and can stall the collapse. Dust grains act as efficient coolants: they absorb thermal energy from the gas and radiate it away as infrared light. This keeps the temperature low enough for gravity to maintain the upper hand.
Without dust cooling, collapsing gas would heat up quickly and resist further compression. The dust essentially bleeds off the heat that would otherwise slow everything down, allowing the cloud to keep shrinking.
From Collapsing Cloud to Protostar
Once gravity wins and collapse begins, the journey to a fully formed star follows a predictable path. The collapsing region fragments into smaller clumps, each destined to become an individual star or star system. As each clump contracts, material falls inward and collects at the center, forming a dense, hot core called a protostar.
At this stage, the protostar isn’t fusing hydrogen yet. It glows because gravitational energy is being converted into heat as material continues to rain down onto it. The protostar is still surrounded by a disk of gas and dust, and it’s often hidden from visible light by the remaining envelope of cloud material.
Young low-mass protostars eventually become visible as T Tauri stars, objects several times larger than their final size that are still slowly contracting. The main energy source during this phase is still gravitational contraction, not fusion.
When Gravity Finally Ignites a Star
The protostar keeps compressing under its own gravity, and its core temperature steadily climbs. The critical threshold is 10 million Kelvin. At that temperature, hydrogen nuclei move fast enough to overcome their mutual electrical repulsion and fuse together, releasing enormous amounts of energy. This is the moment a protostar becomes a true star, joining what astronomers call the main sequence.
How long it takes to reach that point depends almost entirely on mass. A star with the Sun’s mass takes tens of millions of years from initial collapse to hydrogen fusion. A much more massive star, with stronger gravity pulling everything inward faster, can reach the main sequence in just a few hundred thousand years. On the other end of the spectrum, a collapsing clump with less than 0.08 solar masses never reaches 10 million Kelvin at all. Its core isn’t hot enough for sustained hydrogen fusion, so it becomes a brown dwarf instead: a failed star that slowly cools over time.
From start to finish, gravity is the engine driving the entire process. It compresses the gas, heats the core, and ultimately creates the conditions for nuclear fusion. Every other force involved, whether thermal pressure, magnetic fields, or turbulence, either resists gravity or helps set the stage for it. Star formation is, at its core, a story about gravity winning a very long fight.

