Buried water pipelines are subjected to corrosion deterioration and are vulnerable to extreme events (e.g., earthquakes). Corroded metallic buried pipelines have experienced severe damage during past earthquakes resulting in the service disruption of Water Distribution Systems (WDS). Also, continuous and adequate water supply is imperative for fighting fires caused by earthquakes. Therefore, evaluation of the functionality of WDS and its service restoration after an earthquake is very important for the water service provider as well as communities. This paper presents a framework to evaluate both component-level and system-level seismic risk and resilience of WDS considering time-variant corrosion of pipelines. The vulnerability of individual pipelines is modelled by modifying the American Lifelines Alliance (ALA) pipeline vulnerability functions to explicitly account for the strength deterioration due to corrosion. Resilience is modelled using a functionality curve that relates system failure probability and repair activities over time. Probabilistic functionality fragility surface (FFS) is developed for both components and system by integrating the fragility curves and the restoration functions. The use of the proposed framework is demonstrated on two hypothetical water networks, one small scale and one medium scale. The results of the two case studies show that the restoration process has a significant influence on the shape of the FFS. Time to repair a break, number of breaks, network topology, the level of corrosion, and the available resources of utility companies are key parameters that determine the shape of the FFS. It is also observed that larger and older WDS networks experience a significantly higher number of breaks, which compromises their resilience. The proposed framework provides a useful planning tool for asset management of WDS subjected to seismic hazards. (C) 2019 American Society of Civil Engineers.