In general, Independent component analysis (ICA) is a statistical blind source separation technique, used either in spatial or temporal domain. The spatial or temporal ICAs are designed to extract maximally independent sources in respective domains. The underlying sources for spatiotemporal data (sequence of images) can not always be guaranteed to be independent, therefore spatial ICA extracts the maximally independent spatial sources, deteriorating the temporal sources and vice versa. For such data types, spatiotemporal ICA tries to create a balance by simultaneous optimization in both the domains. However, the spatiotemporal ICA suffers the problem of source ambiguity. Recently, constrained ICA (c-ICA) has been proposed which incorporates a priori information to extract the desired source. In this study, we have extended the c-ICA for better analysis of spatiotemporal data. The proposed algorithm, i.e., constrained spatiotemporal ICA (constrained st-ICA), tries to find the desired independent sources in spatial and temporal domains with no source ambiguity. The performance of the proposed algorithm is tested against the conventional spatial and temporal ICAs using simulated data. Furthermore, its performance for the real spatiotemporal data, functional magnetic resonance images (fMRI), is compared with the SPM (conventional fMRI data analysis tool). The functional maps obtained with the proposed algorithm reveal more activity as compared to SPM.