The emerging functional MRI (magnetic resonance imaging), fMRI, imaging modality was developed to obtain non-invasive information regarding the neural processes behind pre-determined task. The data is gathered in such a way that the extraction certainty of the desired information is maximized. Still this is a difficult task due to low Signal-to-Noise Ratio (SNR), corrupting noise and artifacts from several sources. The most prevalent method, here called SPM-GLM uses a conventional statistical inference methodology based on the t-statistics, where it assumes a rather rigid shape on the BOLD hemodynamic response function (HRF), constant for the whole region of interest (ROI). A new algorithm, designed in a Bayesian framework, is presented in this paper, called SPM-MAP. The algorithm jointly detects the brain activated regions and the underlying HRF in an adaptative and local basis. This approach presents two main advantages: (1) the activity detection benefits from the method's high flexibility toward the HRF shape; (2) it provides local estimations for the HRF. The SPM-MAP algorithm is validated by using Monte Carlo tests with synthetic data and comparisons with the SPM-GLM are also performed. Tests using real data are also performed and results are compared with the ones provided by the SPM-GLM method tuned by the medical doctor.