Abstract. A metrized complex of algebraic curves over an algebraically closed field κ is, roughly speaking, a finite metric graph Γ together with a collection of marked complete nonsingular algebraic curves Cv over κ, one for each vertex v of Γ; the marked points on Cv are in bijection with the edges of Γ incident to v. We define linear equivalence of divisors and establish a Riemann-Roch theorem for metrized complexes of curves which combines the classical Riemann-Roch theorem over κ with its graph-theoretic and tropical analogues from [AC, BN, GK, MZ], providing a common generalization of all of these results. For a complete nonsingular curve X defined over a non-Archimedean field K, together with a strongly semistable model X for X over the valuation ring R of K, we define a corresponding metrized complex CX of curves over the residue field κ of K and a canonical specialization map τ CX * from divisors on X to divisors on CX which preserves degrees and linear equivalence. We then establish generalizations of the specialization lemma from [B] and its weighted graph analogue from [AC], showing that the rank of a divisor cannot go down under specialization from X to CX. As an application, we establish a concrete link between specialization of divisors from curves to metrized complexes and the Eisenbud-Harris theory [EH] of limit linear series. Using this link, we formulate a generalization of the notion of limit linear series to curves which are not necessarily of compact type and prove, among other things, that any degeneration of a g r d in a regular family of semistable curves is a limit g r d on the special fiber.