Ultrahigh energy cosmic rays are the most energetic of any subatomic particles ever observed in nature. The quest for their mysterious origin is currently a major scientific challenge. Here we explore the possibility that these particles originate from nearby starburst galaxies, a scenario that matches the recent observation by the Telescope Array experiment of a cosmic-ray hotspot above 57 EeV not far from the direction of the starburst galaxy M82. Specifically, we study the stochastic propagation in space of ultrahigh energy cosmic rays through the state-of-the-art simulation framework CRPropa 3, taking into account all relevant particle interactions as well as deflections by the intervening magnetic fields. To ensure a comprehensive understanding of this model, we consider the energy spectrum, the cosmogenic neutrinos and gamma rays, and the distribution of arrival directions. The starburst galaxy scenario reproduces well observations from both the Telescope Array and Pierre Auger Observatories, making it very attractive for explaining the origin of cosmic rays at the highest energies.