We demonstrate a heterojunction bipolar transistor solar cell (HBTSC), a device that exhibits the performance of a double-junction solar cell in a more compact npn (or pnp) semiconductor structure. The HBTSC concept has the advantages of being a three-terminal device, such as low spectral sensitivity and high tolerance to non-optimal band-gap energies, while it has a lower fabrication and operation complexity than other multi-terminal architectures: it can produce independent power extraction from the two junctions without the need for extra isolating or interconnecting layers between them. The two junctions in our proof-of-concept HBTSC prototype, which is made of epitaxial GaInP/GaAs, exhibit independent current-voltage characteristics under AM1.5G illumination, with respective open-circuit voltages of 1.33 and 0.95 V. The HBTSC opens a new perspective in the understanding of multi-junction devices, and it is an excellent candidate for the application of low-cost fabrication techniques, and for the implementation of III-V-on-silicon tandems.