We consider a compound renewal (Sparre Andersen) risk process with interclaim times that have a Kn distribution (i.e. the Laplace transform of their density function is a ratio of two polynomials of degree at most n ∈ N). The Laplace transform of the expected discounted penalty function at ruin is derived. This leads to a generalization of the defective renewal equations given by Willmot (1999) and Gerber and Shiu (2005). Finally, explicit results are given for rationally distributed claim severities.