We classify compact Riemann surfaces of genus g, where g − 1 is a prime p, which have a group of automorphisms of order ρ(g − 1) for some integer ρ ≥ 1, and determine isogeny decompositions of the corresponding Jacobian varieties. This extends results of Belolipetzky and the second author for ρ > 6, and of the first and third authors for ρ = 3, 4, 5 and 6. As a corollary we classify the orientably regular hypermaps (including maps) of genus p + 1, together with the non-orientable regular hypermaps of characteristic −p, with automorphism group of order divisible by the prime p; this extends results of Conder, Širáň and Tucker for maps.