L-functions in higher rank I