A generator (10) is provided for positioning downhole in a drill string (12) to generate power powering one or more downhole tools (16). The generator includes a progressive cavity housing (28) and a progressive cavity rotor (30) which rotates in response to fluid passing through the progressive cavity housing. A restriction (36) in the annulus downstream from the ports controls the fluid flow in the annulus and past the restriction, and thereby the fluid flow through the progressive cavity housing. The generator may provide either hydraulic or electrical power, or both, powering the one or more tools.