Prognostic studies often involve modeling competing risks, where an individual can experience only one of alternative events, and the goal is to estimate hazard functions and covariate effects associated with each event type. Lunn and McNeil proposed data manipulation that permits extending the Cox's proportional hazards model to estimate covariate effects on the hazard of each competing events. However, the hazard functions for competing events are assumed to remain proportional over the entire follow-up period, implying the same shape of all event-specific hazards, and covariate effects are restricted to also remain constant over time, even if such assumptions are often questionable. To avoid such limitations, we propose a flexible model to (i) obtain distinct estimates of the baseline hazard functions for each event type, and (ii) allow estimating time-dependent covariate effects in a parsimonious model. Our flexible competing risks regression model uses smooth cubic regression splines to model the time-dependent changes in (i) the ratio of event-specific baseline hazards, and (ii) the covariate effects. In simulations, we evaluate the performance of the proposed estimators and likelihood ratio tests, under different assumptions. We apply the proposed flexible model in a prognostic study of colorectal cancer mortality, with two competing events: 'death from colorectal cancer' and 'death from other causes'.