This study presents a novel perspective on pressure-transient analysis (PTA) of downhole-pressure and flow-rate data by use of system-identification (SI) techniques as widely used in advanced process engineering. Key features of the paper are that it considers the classic PTA process from a system-theoretical perspective; derives the causal structure of the flow dynamics; proposes a method to deal with continuously varying pressure and flow-rate signals contaminated with correlated noise, which estimates physical reservoir parameters through a systematic matching procedure in the frequency domain; and can cope with arbitrary (i.e., not necessarily piecewise constant) flow-rate signals. To this end, the wellbore and the reservoir are modeled as two distinct two-port power-transmitting systems that are bilaterally coupled at their common boundary. This structure reveals that, from an SI perspective, the wellbore dynamics affect the bottomhole data as a feedback mechanism. Because of this feedback structure, it is necessary to use closed-loop SI techniques, and, because of the presence of sensor noise, the reservoir model cannot be identified solely from the bottomhole measurements. Therefore, an auxiliary signal is needed, for which we choose the surface flow rate, although other signals, such as the bottomhole temperature, could potentially also be used. Then a suitable closed-loop SI technique is the so-called two-stage method. The first stage of the algorithm removes the dynamic effects of the wellbore from the noisy data, and the second stage identifies the reservoir model in terms of rational polynomials. Thereafter, the usual physical reservoir parameters (e.g., averaged permeability and skin factor) are obtained through matching the results of the identified reservoir model and those of typical analytical reservoir models in the frequency domain, as an alternative to classic graphical or numerical type-curve analysis. The method does not rely on a piecewise constant approximation of the flow-rate signal, unlike other known PTA methods such as time-domain deconvolution. Six numerical experiments, by use of a synthetic data set, and one field example, by use of data from a real gas well, illustrate the key aspects of the proposed method.