Wireless sensor networks are fundamentally different from other wireless networks due to energy constraints and spatial correlation among sensor measurements. Mechanisms that efficiently compress and transport sensor data in the network are needed. We consider the problem of maximizing lifetime of wireless sensor networks that are entitled with the task of estimating an unknown parameter or process and thus need to adhere to estimation error specifications. We investigate optimal endogenous sensor measurement rate control, in-network data aggregation and routing for achieving the goal above. Sensors take measurements and aggregate incoming data from neighbors in a single outgoing flow by applying appropriate aggregation weights. By doing so, they control the variance of outgoing flow. Each sensor controls its measurement rate and aggregation weights, and aggregated measurement data are routed to the FC for Maximum Likelihood (ML) estimation. The challenge is to find an optimal compromise between eliminating data redundancy and maintaining data representation accuracy so as to adhere to estimation quality constraints and reduce the volume of transported data, thus improving network lifetime. Sensor spatial correlation, measurement accuracies, link qualities and energy reserves affect sensor measurement rates, data aggregation and routes to the FC. On the other hand, measurement rates, aggregation, and sensor characteristics impact the estimation error. We show that the problem can be decomposed into separate optimization problems where each sensor autonomously takes its measurement rate, aggregation and routing decisions. We design an iterative primal-dual algorithm that relies on low overhead feedback from the FC to the nearest sensors, and on sensor neighbor Lagrange multiplier exchanges. Our work strikes the optimal fundamental tradeoff between network lifetime, in-network data aggregation and estimation quality and yields a solution based on distributed sensor co- - ordination.